Home/Foundations/Spacing & layout

Spacing & layout

Four-pixel base, eight-pixel rhythm. The product is dense by nature; the chrome around it isn't. Generous air over hairline borders.

14 steps 4 px base 24 px gutter

Spacing scale

Use multiples of 4 px. The default rhythm is 8 px. Three steps go big — 64, 80, 96 — for page-level separation.

--space-1
4 px
--space-2
8 px
--space-3
12 px
--space-4
16 px
--space-5
20 px
--space-6
24 px
--space-7
32 px
--space-8
40 px
--space-9
48 px
--space-10
64 px
--space-11
80 px
--space-12
96 px

Eight-point rhythm

The base unit is 8. Doubled at 16 for component padding; doubled again at 32 for section gaps. Half-step (4) only for tight contexts — toolbar chips, table cell content.

4
8
12
16
20
24
32

Radii

Six steps from sharp to pill. Default control radius is 8 px; cards round to 12. We never use 0 (the product feels softer when nothing is sharp).

XS
4 px
SM
6 px
MD
8 px · control
LG
10 px
XL
14 px · card
2XL
18 px
Pill
9999 px

Layout

Fixed 264 px sidebar. 24 px content gutter on every side. Forms cap at 900 px; data-heavy pages widen to 1300 px.

--sidebar-w · 264 px
Content column · 24 px gutter both sides · max-width 900 px (forms) / 1300 px (data)
TokenValueUsed for
--sidebar-w264 pxDefault app shell sidebar
--sidebar-w-narrow240 pxDense vertical kits
--rail-w220 pxSettings rail (inside content)
--content-max900 pxForm columns, settings, prose
--gutter-x24 pxHorizontal page gutter
--row-y12 pxVertical padding inside list rows

Control heights

Four control sizes. 36 px is default — the touch-friendly compromise between desktop density and finger-friendliness. Mobile portals lift to 44 px.

Do & don't

Do

Use a token. padding: var(--space-4) is always 16 px and stays in rhythm.

Don't

Type 15px anywhere. Round to the nearest token — usually --space-4 (16 px).

Do

Use bigger gaps between sections (48 px) than within them (16 px). Hierarchy is communicated by space.

Don't

Cram primary actions into 28 px tall controls. Anything that gets clicked is at least 36 px.