Spacing
Spacing properties ensure unified spacing throughout components.
Spacing Unit
All components align to an 8px square baseline grid for mobile, tablet, and desktop.
Spacing Utility Classes
To enable adherence to this grid, a set of breakpoint-friendly spacing utilities are available. These apply either margin
or padding
relative to 8x the value provided at a range of 0-8.
You can completely customize the spacing classes produced by modifying the $u-spacers map
. Modifications will get merged with the default map.
Utility Class Format
Spacing classes are defined in the following format:
.u-[m|p][side]-[breakpoint]-[size]
Where:
m
=margin
p
=padding
side
=t|b|l|r|x|y
breakpoint
= the breakpoint key, such asm
size
= a value defined in$u-spacers
, by default 0-8, plusauto
for use with margin classes