Design/Spacing scale

Spacing and layout

The spacing scale, the grid, the breakpoints and the sizes of controls and the shell.

Spacing scale

The scale and where each step is used.

Every step a multiple of 4 px: --space-1 … --space-24.

TokenValueSizeWhere
--space-14pxAn icon and its word in a badge; a label and its hint.
--space-28pxInside a chip; a field’s label and the field; buttons side by side.
--space-312pxRows of a list; the photo and the text of a row.
--space-416pxFields of a form; a card’s padding on a phone.
--space-520pxA card’s padding.
--space-624pxBetween cards; the grid’s gutter.
--space-832pxThe page’s margin on a desktop; a dialog’s padding.
--space-1040pxBetween the sections of a screen.
--space-1248pxBetween the parts of a long page.
--space-1664pxAbove and below a band of the home page.
--space-2080pxBetween the home page’s bands on a wide screen.
--space-2496pxThe opening of the home page.

Grid and breakpoints

Columns, gutters, the widths the layout changes at.

123456789101112
TokenValueWhat it is
--grid-columns12Columns of the grid, on every width; a phone groups them by 6 or 12.
--grid-gutter24pxThe gap between columns and between cards.
--grid-gutter-sm16pxThe gap on a phone.
--grid-margin32pxThe page’s margin left and right.
--grid-margin-sm16pxThe margin on a phone.
--size-page1280pxThe widest the content grows; past it the margins grow.
BreakpointFromTypicallyWhat changes
—0PhoneOne column; a listing grid of 2; filters in a sheet; the main action of a listing fixed at the bottom.
--breakpoint-sm640pxLarge phone, small tabletA listing grid of 3; forms keep their width.
--breakpoint-md900pxTablet, small laptopPhotos and the buy panel side by side; filters in a column beside the results; the admin sidebar shows.
--breakpoint-lg1200pxDesktopA listing grid of 4; the featured selection in one row.
--breakpoint-xl1440pxWide desktopNothing new: the content stops at the page width and the margins grow.

Sizes

Controls, the shell, the form width.

TokenSizeValueWhere
--size-control-smSmall control32pxA filter, a button in a table row.
--size-controlControl40pxButtons and fields.
--size-touchTouch target44pxThe smallest thing a finger is given; a small control gets the space around it.
--size-control-lgLarge control48pxBuy now, Pay: the main action of a listing or checkout.
--size-headerHeader56pxThe top bar.
--size-sidebarSidebar240pxThe admin menu, a seller’s dashboard menu.
--size-formForm384pxSign-in, a single-column form.
--size-drawerDrawer400pxFilters on a tablet, an order’s detail in the admin.
--size-dialogDialog480pxA confirmation, an offer.
--size-proseProse680pxThe longest line of running text.
--size-pagePage1280pxThe widest the content grows.