Spacing
Fourteen steps on a 2 px base. The scale is fine at the small end, where figures, units and status dots need exact distances, and opens up for layout.
Scale
Steps are named by their value in pixels, so --sonar-space-12 is 12 px wherever you read it. Use the
closest step; if none fits, the design probably needs a different structure, not a new number.
-
2
--sonar-space-2 -
4
--sonar-space-4 -
6
--sonar-space-6Icon to label, status dot to its text. The most common gap inside rows. -
8
--sonar-space-8 -
10
--sonar-space-10 -
12
--sonar-space-12Between related controls in a row. -
14
--sonar-space-14 -
16
--sonar-space-16 -
20
--sonar-space-20Between cards: the layout gap. -
24
--sonar-space-24 -
28
--sonar-space-28Card padding, left and right, at every size. -
32
--sonar-space-32Page margin on desktop. -
40
--sonar-space-40 -
48
--sonar-space-48Minimum touch target on tablets and phones.
Cards on the grid
Cards keep 28 px of side padding at every size and sit 20 px apart, in columns and in rows. Content inside a card aligns to the padding, so titles, rules and figures line up from card to card.
Orders
Content aligns to the padding.
Deliveries
Content aligns to the padding.