Spacing Scale, Border Radius and Elevation Guidelines
Spacing
One base step of 4px. Every gap is a mark on this ruler.
A ruler from 0 to 48 pixels with a mark every 4 pixels. Each step of the spacing scale is a button on it; the chosen step is drawn below at its real size.
--ds-control-smTables, toolbars--ds-control-mdDefault--ds-control-lgTouch, main actionControl height
Grouping
Close inside a group, clearly further between groups.
A short form in two groups. Change the two gaps and watch whether the groups still read apart.
Groups read at a glance
Corners
Six corners per setting, from a tag to a widget card.
Six shapes, each at one step of the corner scale of the chosen setting.
- Tag
--ds-radius-xs · 6 - Button
--ds-radius-sm · 8 - Card
--ds-radius-md · 12 - Dialog
--ds-radius-lg · 16 - Hero
--ds-radius-xl · 24 - Widget card
--ds-radius-2xl · 28
Nested corners
Inner corner = outer corner − padding.
A card with an inner panel. The inner corner follows the outer corner minus the padding, or copies it, to compare.
Inner28 − 8 = 20
The gap stays even all the way round
Elevation
Four levels. Higher floats further. In dark, higher is lighter.
The same small screen in the light and the dark theme, built up level by level: page, card, menu, dialog.
Dark: each level a lighter surface, shadows stay faint.