Foundations · Spacing

Foundations

Spacing

One ladder for margin, padding and gap, named by value — --space-16 is always 16px. The step size changes once:

  • 20px and below — 2px steps. Small spacing does optical work (icon gaps, label offsets, control padding) where 4px is too coarse and 2px is the real resolution.
  • Above 20px — 4px steps. Nothing at this scale needs that fineness, so the grid doubles and the ladder stays short.

The ladder. Derived from the codebase rather than imposed on it — 726 of 727 spacing uses across both projects already obeyed the rule. Every step is in use; legal-but-unused values (52, 68, 76, 84 …) get added on demand. Emitted in rem, and the px column is measured off each rendered bar rather than restated.

2 px steps — optical range
--space-0
Reset.
--space-2
Hairline nudge, icon offset.
--space-4
Tightest gap.
--space-6
Icon / label gap.
--space-8
Inline gap.
--space-10
Control padding.
--space-12
List-item rhythm.
--space-14
Control padding, meta rhythm.
--space-16
Default block gap — the workhorse.
--space-18
Rare — list indent.
--space-20
Paragraph rhythm, card padding.
4 px steps — structural range
--space-24
Block gap, card padding.
--space-28
Block gap.
--space-32
Group gap.
--space-36
Group gap.
--space-40
Group gap, page gutter max.
--space-44
Footer padding.
--space-48
Group gap.
--space-56
Block separation.
--space-60
Hero page bottom.
--space-64
Block separation.
--space-72
Section gap.
--space-80
Section gap, page bottom.
--space-88
Page top — standard, mobile.
--space-96
Section gap, page top — index, mobile.
--space-104
Page top — hero, mobile.
--space-112
Section gap.
--space-120
Section gap, page top — standard, desktop.
--space-128
Section gap.
--space-140
Page top — index, desktop.
--space-156
Page top — hero, desktop.
--space-160
Widest section gap.