Gap

Vertical space measured in the system’s squares. A gap is an empty block as wide as its column, and its height is the only thing it has. One square by default, it stands between two things that need room and keeps that room on the grid.

Space between related sections

One square separates a title from its details; two squares mark the next section.

One square of space

The gap separates two lines by one 20px square.

Use unit for one square and double for two. The size attribute also selects a scale token, for example size="05" for half a square or size="2" for two squares.

A gap is empty space. It does not wrap content and is not a flexbox gap between children.

HeightsizeAttribute
A tenth of a square01tenth
A quarter of a square025quarter
Half a square05half
Four fifths of a square08eight-tenth
One square1unit
Two squares2double
Three squares3triple
Four squares4quad
Eight squares8oct
Twelve squares12dozen

A gap is a block that takes the column’s width, and it does not shrink in a flex column. Its height is multiplied by the surface scale, so it stays on the grid on phones. With no size it is one square. Add hidden to take it out.

A gap has no role, no words and no focus, and assistive technology passes over it. Space says nothing to a screen reader, so let a heading or a list show that two things are separate.

size takes the values in the table, or use the attribute beside it. There are no slots or events.

TokenWhat it does
--ds-gap-row-spaceAdded once for each whole square of height, 0px by default. Sizes under one square add none.

Copy gap through Sync 1. On Apple platforms it is DS1Gap.

Styling and tokens · Row