Foundations
Sizing
Fixed dimensions that are not spacing: how tall a control is, how thick a line is, how wide the content gets.
Why we chose this
Spacing says how far apart things are. Sizing says how big a few critical things are, and each one protects someone: a touch target they can hit, a focus ring they can see, a line that stays crisp. As tokens, these minimums can't be quietly shrunk inside one component.
Use it for
- Every control height:
min-height: var(--control-min-height)(44px) - Every border and focus ring:
border-width,focus-ring-width - The widest the content gets:
content-wide(1280px)
Don't
- Set a fixed
heighton a control. Usemin-heightso it can grow. - Make anything clickable smaller than 24px. Aim for 44px.
- Remove or thin the focus ring.
All size tokens
Touch targets
Two numbers matter. 44px (control-min-height) is the target for every button, field and select. 24px (hit-target-floor) is the absolute minimum for tiny controls like a checkbox box, and only when 44px is truly impossible.
Use min-height, so a larger font or two lines can still grow the control.
.field {
min-height: var(--control-min-height);
}
:focus-visible {
outline: var(--focus-ring-width) solid var(--focus-primary);
outline-offset: var(--focus-ring-offset);
}A fixed small height is hard to tap and won't grow with text size.
.field {
height: 26px;
}
:focus {
outline: none;
}Borders and focus
Every hairline is border-width (1px). Keyboard focus is a focus-ring-width (2px) outline set off by focus-ring-offset (2px) in the focus-primary color, so the ring never touches the element and stays visible on any surface. Press Tab to try it.
:focus-visible { outline: var(--focus-ring-width) solid var(--focus-primary);
outline-offset: var(--focus-ring-offset); }
Page layout
| Token | Mobile | Web | Meaning |
|---|---|---|---|
| Side gutter | gutter-mobile | gutter-desktop | Space between the screen edge and the content. Switches at 768px. |
| Measuring grid cell | grid-cell-mobile | grid-cell | The decorative background grid. |
| Content width | full width minus gutters | up to content-wide | Maximum width of wide layouts such as galleries. |
Mobile · 16px gutter
Web · 24px gutter
Diagram drawn at real gutter sizes.
Stroke widths
Line thickness for icons and illustrations. stroke-1.5 is the usual icon weight, stroke-2 is for emphasis, and stroke-0.5 only for very dense icons.
Rules
| Rule | Reason |
|---|---|
Controls use min-height: var(--control-min-height), never height. | They grow with text zoom and wrapping. |
| Never go under 24px for anything clickable. Aim for 44px. | Touch accuracy. |
| Don't remove or thin the focus ring. | Keyboard users depend on it. |
Use border-width for every border. Heavier borders (stroke-2) only for errors and emphasis. | Keeps edges quiet and consistent. |
Keep long text out of full-width layouts. Cap reading width with max-width: 65ch. | Wide lines are hard to read. |