Spacing and layout
There are three spacing scales, which follow the Client-First conventions:
space is for gaps and spacers.
padding backs the padding-* utilities.
margin backs the margin-* utilities.
The scales share size names but not always values. For example, space.medium is 2rem while
padding.medium is 1.5rem. Always pick the scale that matches the property you’re setting.
Page and section
The page inset has a mobile mode: it drops to 1rem at the mobile breakpoint.
| Token | CSS variable | Value |
|---|
| padding.page Horizontal page inset | --padding-page | 3rem mobile: 1rem |
| Token | CSS variable | Value | Preview |
|---|
| padding.section.none | --padding-section-none | 0rem | |
| padding.section.small | --padding-section-small | 3rem | |
| padding.section.medium | --padding-section-medium | 5rem | |
| padding.section.large | --padding-section-large | 8rem | |
Containers
| Token | CSS variable | Value | Preview |
|---|
| container.small | --container-small | 48rem | |
| container.medium | --container-medium | 64rem | |
| container.large | --container-large | 90rem | |
Space
| Token | CSS variable | Value | Preview |
|---|
| space.tiny | --space-tiny | 0.125rem | |
| space.xxsmall | --space-xxsmall | 0.25rem | |
| space.xsmall | --space-xsmall | 0.5rem | |
| space.small | --space-small | 1rem | |
| space.xmedium | --space-xmedium | 1.5rem | |
| space.medium | --space-medium | 2rem | |
| space.large | --space-large | 3rem | |
| space.xlarge | --space-xlarge | 4rem | |
| space.xxlarge | --space-xxlarge | 5rem | |
| space.huge | --space-huge | 6rem | |
| space.xhuge | --space-xhuge | 8rem | |
| space.xxhuge | --space-xxhuge | 12rem | |
Padding
| Token | CSS variable | Value | Preview |
|---|
| padding.none | --padding-none | 0rem | |
| padding.tiny | --padding-tiny | 0.25rem | |
| padding.xxsmall | --padding-xxsmall | 0.5rem | |
| padding.xsmall | --padding-xsmall | 0.75rem | |
| padding.small | --padding-small | 1rem | |
| padding.regular | --padding-regular | 1.25rem | |
| padding.medium | --padding-medium | 1.5rem | |
| padding.xmedium | --padding-xmedium | 2rem | |
| padding.large | --padding-large | 3rem | |
| padding.xlarge | --padding-xlarge | 4rem | |
| padding.xxlarge | --padding-xxlarge | 5rem | |
| padding.huge | --padding-huge | 6rem | |
| padding.xhuge | --padding-xhuge | 8rem | |
| padding.xxhuge | --padding-xxhuge | 12rem | |
Margin
| Token | CSS variable | Value | Preview |
|---|
| margin.none | --margin-none | 0rem | |
| margin.tiny | --margin-tiny | 0.2rem | |
| margin.xxsmall | --margin-xxsmall | 0.25rem | |
| margin.xsmall | --margin-xsmall | 0.5rem | |
| margin.small | --margin-small | 1rem | |
| margin.medium | --margin-medium | 2rem | |
| margin.large | --margin-large | 3rem | |
| margin.xlarge | --margin-xlarge | 4rem | |
| margin.xxlarge | --margin-xxlarge | 5rem | |
| margin.huge | --margin-huge | 6rem | |
| margin.xhuge | --margin-xhuge | 8rem | |
| margin.xxhuge | --margin-xxhuge | 12rem | |
Widths
| Token | CSS variable | Value | Preview |
|---|
| width.full | --width-full | 100% | |
| width.xxsmall | --width-xxsmall | 20rem | |
| width.xsmall | --width-xsmall | 25rem | |
| width.small | --width-small | 30rem | |
| width.medium | --width-medium | 32rem | |
| width.large | --width-large | 48rem | |
| width.xlarge | --width-xlarge | 64rem | |
| width.xxlarge | --width-xxlarge | 80rem | |