Skip to content

Type to search the docs, API, and blog.

↑↓ navigate↵ openesc close
  • Zazz 0.14 alpha

    API

    Sizing

    Width, height, and their limits.

    Numbers are scale steps and lengths pass through. --w, --h, --min-w, and --max-w also take the keywords auto, fit-content, min-content, and max-content, at any tier; --size, --min-h, and --max-h take none. For a reading column, prefer the article widths: --max-w: var(--article-lg).

    Reference

    Sizing utilities
    UtilityWritesValueTiersNotes
    --winline-sizescale number or lengthbreakpointsKeywords: auto, fit-content, min-content, max-content; --before-w / --after-w
    --min-wmin-inline-sizescale number or lengthbreakpointsKeywords: auto, fit-content, min-content, max-content; --before-min-w / --after-min-w
    --max-wmax-inline-sizescale number or lengthbreakpointsKeywords: auto, fit-content, min-content, max-content; --before-max-w / --after-max-w
    --hblock-sizescale number or lengthbreakpointsKeywords: auto, fit-content, min-content, max-content; --before-h / --after-h
    --min-hmin-block-sizescale number or lengthbreakpoints--before-min-h / --after-min-h
    --max-hmax-block-sizescale number or lengthbreakpoints--before-max-h / --after-max-h
    --sizeinline-size, block-sizescale number or lengthbreakpoints--before-size / --after-size

    Examples

    --w: 3
    --w: 4
    --w: 6
    --w: 11
    --w: 100%
    <div
      style="
        --display: flex-col;
        --gap: 4;
        --w: 100%;
        --max-w: 96;
      "
    >
      <div
        style="
          --display: flex;
          --items: center;
          --gap: 4;
        "
      >
        <div
          style="
            --w: 3;
            --h: 4;
            --bg: var(--color-primary);
            --radius: 1.5;
          "
        ></div>
        <span
          data-ui="text-xs"
          style="
            --font-weight: strong;
            --text: var(--color-muted-foreground);
          "
          >--w: 3</span
        >
      </div>
      <div
        style="
          --display: flex;
          --items: center;
          --gap: 4;
        "
      >
        <div
          style="
            --w: 4;
            --h: 4;
            --bg: var(--color-primary);
            --radius: 1.5;
          "
        ></div>
        <span
          data-ui="text-xs"
          style="
            --font-weight: strong;
            --text: var(--color-muted-foreground);
          "
          >--w: 4</span
        >
      </div>
      <div
        style="
          --display: flex;
          --items: center;
          --gap: 4;
        "
      >
        <div
          style="
            --w: 6;
            --h: 4;
            --bg: var(--color-primary);
            --radius: 1.5;
          "
        ></div>
        <span
          data-ui="text-xs"
          style="
            --font-weight: strong;
            --text: var(--color-muted-foreground);
          "
          >--w: 6</span
        >
      </div>
      <div
        style="
          --display: flex;
          --items: center;
          --gap: 4;
        "
      >
        <div
          style="
            --w: 11;
            --h: 4;
            --bg: var(--color-primary);
            --radius: 1.5;
          "
        ></div>
        <span
          data-ui="text-xs"
          style="
            --font-weight: strong;
            --text: var(--color-muted-foreground);
          "
          >--w: 11</span
        >
      </div>
      <div
        style="
          --display: flex;
          --items: center;
          --gap: 4;
        "
      >
        <div
          style="
            --w: 100%;
            --h: 4;
            --bg: var(--color-secondary);
            --radius: 1.5;
          "
        ></div>
        <span
          data-ui="text-xs"
          style="
            --font-weight: strong;
            --whitespace: nowrap;
            --text: var(--color-muted-foreground);
          "
          >--w: 100%</span
        >
      </div>
    </div>
    --size: 3
    --size: 4
    --size: 6
    --size: 11
    --size: 24
    <div
      style="
        --display: flex;
        --flex-wrap: wrap;
        --items: end;
        --gap: 6;
        --w: 100%;
        --max-w: 96;
      "
    >
      <div
        style="
          --display: flex-col;
          --items: center;
          --gap: 2;
        "
      >
        <div
          style="
            --size: 3;
            --bg: var(--color-primary);
            --radius: 1.5;
          "
        ></div>
        <span
          data-ui="text-xs"
          style="
            --font-weight: strong;
            --text: var(--color-muted-foreground);
          "
          >--size: 3</span
        >
      </div>
      <div
        style="
          --display: flex-col;
          --items: center;
          --gap: 2;
        "
      >
        <div
          style="
            --size: 4;
            --bg: var(--color-primary);
            --radius: 1.5;
          "
        ></div>
        <span
          data-ui="text-xs"
          style="
            --font-weight: strong;
            --text: var(--color-muted-foreground);
          "
          >--size: 4</span
        >
      </div>
      <div
        style="
          --display: flex-col;
          --items: center;
          --gap: 2;
        "
      >
        <div
          style="
            --size: 6;
            --bg: var(--color-primary);
            --radius: 1.5;
          "
        ></div>
        <span
          data-ui="text-xs"
          style="
            --font-weight: strong;
            --text: var(--color-muted-foreground);
          "
          >--size: 6</span
        >
      </div>
      <div
        style="
          --display: flex-col;
          --items: center;
          --gap: 2;
        "
      >
        <div
          style="
            --size: 11;
            --bg: var(--color-primary);
            --radius: 2.5;
          "
        ></div>
        <span
          data-ui="text-xs"
          style="
            --font-weight: strong;
            --text: var(--color-muted-foreground);
          "
          >--size: 11</span
        >
      </div>
      <div
        style="
          --display: flex-col;
          --items: center;
          --gap: 2;
        "
      >
        <div
          style="
            --size: 24;
            --bg: var(--color-primary);
            --radius: 2.5;
          "
        ></div>
        <span
          data-ui="text-xs"
          style="
            --font-weight: strong;
            --text: var(--color-muted-foreground);
          "
          >--size: 24</span
        >
      </div>
    </div>

    API