Foundations Spacing & sizing

Spacing & sizing

A 4px base grid expressed the Tailwind v4 way: one --spacing multiplier rather than a list of fixed steps.

How it works: --spacing: 4px, and every step is calc(N × var(--spacing)) — so p-4 is 16px. In a Tailwind v4 project any integer works (p-7, p-13) because it is computed, not looked up. The 11 --space-* variables below are the curated set for plain-CSS consumers.

The scale

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

Token reference

The --spacing multiplier plus the 11 curated steps. Tailwind derives padding, margin, gap and sizing utilities from the same scale.
CSS variableValueTailwindFigma
--spacing4pxbase multiplier — drives all p-*/m-*/gap-*/w-*— gap (Figma stores the 11 discrete steps instead)
--space-14pxp-1 m-1 gap-1 w-1space/1
--space-28pxp-2 m-2 gap-2 w-2space/2
--space-312pxp-3 m-3 gap-3 w-3space/3
--space-416pxp-4 m-4 gap-4 w-4space/4
--space-520pxp-5 m-5 gap-5 w-5space/5
--space-624pxp-6 m-6 gap-6 w-6space/6
--space-832pxp-8 m-8 gap-8 w-8space/8
--space-1040pxp-10 m-10 gap-10 w-10space/10
--space-1248pxp-12 m-12 gap-12 w-12space/12
--space-1664pxp-16 m-16 gap-16 w-16space/16
--space-2080pxp-20 m-20 gap-20 w-20space/20
tokens/fig-tokens.css holds a fuller raw scale from the original Figma export (27 entries including half-steps like --spacing-2-5). That layer is unitless and intentionally off Tailwind's namespaces — treat the curated --space-* set above as the one to build with.