Spacing Utilities

Apply compact token-driven padding, margin, and axis-specific gaps that respond to the shared density setting.

Spacing utilities use the compatibility --spacing-* scale, which is mapped to the canonical density-aware spacing system.

Padding and margin

Padding utilities are .p-xs, .p-sm, .p-md, .p-lg, and .p-xl. Margin utilities use the same suffixes: .m-xs through .m-xl.

Compare the padding scale

Each step comes from the shared spacing scale and changes with --density-factor.

XS
SM
MD
LG
XL

Use margin for an intentional local offset

Margin utilities are useful at integration boundaries; layout gaps remain preferable for repeated sibling rhythm.

XS outer space
MD outer space
XL outer space

Axis gaps

Use .gap-x-xs through .gap-x-xl for column gaps and .gap-y-xs through .gap-y-xl for row gaps. They work with grid, flexbox, and the CSS Tags layout primitives.

Tune row and column rhythm independently

This grid uses a large column gap and a small row gap without hardcoded lengths.

One
Two
Three
Four
Five
Six

For responsive, content-driven spacing between children, prefer the gap inputs on layout primitives.