Spacing

One base unit, --spacing, and every padding, margin, gap and size utility as a multiple of it.

Summary

Every spacing utility is a multiple of one base unit, --spacing. A utility n is n × 0.25rem: p-4 is 1rem, gap-2 is 0.5rem.

Note

Inherited from Tailwind v4 defaults, not yet a pmndrs decision. See Tailwind's padding docs.

Base unit

TokenValue
--spacing0.25rem

The same scale drives padding (p-*), margin (m-*), gaps (gap-*, space-*), sizes (w-*, h-*, size-*, min-*, max-*), offsets (inset-*, top-*…) and translations (translate-*). Any multiple works, not only the steps below: p-13 is 3.25rem. Prefix a utility with - for a negative value (-mt-2), and use brackets for a one-off (p-[5px]).

Scale

The common steps, with the value your project gets. Pixels assume the browser's default 16px root. The bars are live w-* utilities, rendered with this site's CSS: its root is 17px, so they draw slightly wider than in your project. The table is the source of truth.

UtilityValuePixelsPreview
000
px1px1px
0.50.125rem2px
10.25rem4px
1.50.375rem6px
20.5rem8px
2.50.625rem10px
30.75rem12px
3.50.875rem14px
41rem16px
51.25rem20px
61.5rem24px
71.75rem28px
82rem32px
92.25rem36px
102.5rem40px
112.75rem44px
123rem48px
143.5rem56px
164rem64px
205rem80px
246rem96px
287rem112px
328rem128px
369rem144px
4010rem160px
4411rem176px
4812rem192px
5213rem208px
5614rem224px
6015rem240px
6416rem256px
7218rem288px
8020rem320px
9624rem384px