--- title: "Spacing" subtitle: "One scale, and the rule about which layer applies it" description: "The spacing scale and the discipline around it: sections carry macro spacing, blocks carry micro spacing, and containers carry width and nothing else." author: "Studio" section: "Website" subsection: "Foundations" order: 5 status: "published" --- Spacing is one scale applied at three layers, and most layout problems come from applying it at the wrong one. Sections set the distance between major bands of a page, blocks set the rhythm inside a stack, and containers set width. The utility class names are indexed on the [Classes](/website/classes.html) page; this page is the scale itself and the rule about who applies it. ## The scale `--space-*` tokens alias the unit scale, so re-stepping the units moves every spacing decision on the site at once. | Token | Value | Token | Value | | --- | --- | --- | --- | | `var(--space-none)` | 0 | `var(--space-6xl)` | 64px | | `var(--space-2xs)` | 2px | `var(--space-7xl)` | 72px | | `var(--space-xs)` | 4px | `var(--space-8xl)` | 80px | | `var(--space-s)` | 8px | `var(--space-9xl)` | 88px | | `var(--space-m)` | 12px | `var(--space-10xl)` | 96px | | `var(--space-l)` | 16px | `var(--space-11xl)` | 104px | | `var(--space-xl)` | 24px | `var(--space-12xl)` | 112px | | `var(--space-2xl)` | 32px | `var(--space-13xl)` | 120px | | `var(--space-3xl)` | 40px | `var(--space-14xl)` | 160px | | `var(--space-4xl)` | 48px | | | | `var(--space-5xl)` | 56px | | | Only eight of these have gap utilities and six have padding utilities. The rest exist for component CSS, which reaches for the token directly. ## Section spacing Sections take their vertical space from a separate set of tokens, deliberately coarser than the block scale so the gap between bands never lands near the gap inside one. | Token | Resolves to | Value | Utility | | --- | --- | --- | --- | | `var(--section-xs)` | `var(--space-xl)` | 24px | none | | `var(--section-s)` | `var(--space-2xl)` | 32px | `.top-small` · `.bottom-small` | | `var(--section-m)` | `var(--space-6xl)` | 64px | `.top-medium` · `.bottom-medium` | | `var(--section-l)` | `var(--space-10xl)` | 96px | `.top-large` · `.bottom-large` | | `var(--section-xl)` | `var(--space-14xl)` | 160px | `.top-xl` · `.bottom-xl` |
gap-none
gap-s — 8px
gap-l — 16px
gap-2xl — 32px
Medically reviewed