Skip to content
Somewhere design system

Spacing and layout

There are three spacing scales, which follow the Client-First conventions:

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.

TokenCSS variableValue
padding.page
Horizontal page inset
--padding-page3rem
mobile: 1rem
TokenCSS variableValuePreview
padding.section.none--padding-section-none0rem
padding.section.small--padding-section-small3rem
padding.section.medium--padding-section-medium5rem
padding.section.large--padding-section-large8rem

Containers

TokenCSS variableValuePreview
container.small--container-small48rem
container.medium--container-medium64rem
container.large--container-large90rem

Space

TokenCSS variableValuePreview
space.tiny--space-tiny0.125rem
space.xxsmall--space-xxsmall0.25rem
space.xsmall--space-xsmall0.5rem
space.small--space-small1rem
space.xmedium--space-xmedium1.5rem
space.medium--space-medium2rem
space.large--space-large3rem
space.xlarge--space-xlarge4rem
space.xxlarge--space-xxlarge5rem
space.huge--space-huge6rem
space.xhuge--space-xhuge8rem
space.xxhuge--space-xxhuge12rem

Padding

TokenCSS variableValuePreview
padding.none--padding-none0rem
padding.tiny--padding-tiny0.25rem
padding.xxsmall--padding-xxsmall0.5rem
padding.xsmall--padding-xsmall0.75rem
padding.small--padding-small1rem
padding.regular--padding-regular1.25rem
padding.medium--padding-medium1.5rem
padding.xmedium--padding-xmedium2rem
padding.large--padding-large3rem
padding.xlarge--padding-xlarge4rem
padding.xxlarge--padding-xxlarge5rem
padding.huge--padding-huge6rem
padding.xhuge--padding-xhuge8rem
padding.xxhuge--padding-xxhuge12rem

Margin

TokenCSS variableValuePreview
margin.none--margin-none0rem
margin.tiny--margin-tiny0.2rem
margin.xxsmall--margin-xxsmall0.25rem
margin.xsmall--margin-xsmall0.5rem
margin.small--margin-small1rem
margin.medium--margin-medium2rem
margin.large--margin-large3rem
margin.xlarge--margin-xlarge4rem
margin.xxlarge--margin-xxlarge5rem
margin.huge--margin-huge6rem
margin.xhuge--margin-xhuge8rem
margin.xxhuge--margin-xxhuge12rem

Widths

TokenCSS variableValuePreview
width.full--width-full100%
width.xxsmall--width-xxsmall20rem
width.xsmall--width-xsmall25rem
width.small--width-small30rem
width.medium--width-medium32rem
width.large--width-large48rem
width.xlarge--width-xlarge64rem
width.xxlarge--width-xxlarge80rem