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 control, 3232pxA chip, a table row’s action, the pager (--control-height-sm).
--size-controlControl, 4040pxEvery input, Select and button by default (--control-height-md); 12 px inside a field, 16 px inside a button. On the phone fields and buttons stand at 44.
--size-touchTouch target44pxThe smallest thing a finger is given; a small control gets the space around it.
--size-control-lgLarge control, 4444pxThe back office’s rare emphasised action; the phone’s buttons. The web has none.
--padding-form-cardForm card’s inside24px24 px, 16 px under 640 px; a field grows to 420 px at most, 16 px from the next, its label 6 px above it.
--size-toplineWeb: top line32pxThe dark line over the editorial header.
--size-mastheadWeb: masthead72pxSearch, wordmark, account; from 768 px up.
--size-admin-headerAdmin: top bar64pxThe address, the theme, Sign out.
--size-headerPhone: top bar56pxThe app’s bar (52); the web’s drawer head (56).
--size-admin-sidebarAdmin: sidebar256pxThe back office’s menu. The web has no sidebar.
--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.