gap

The CSS property that sets the space between grid or flex tracks, without adding space around the outside.

In more detail

It works in flex, grid and multi-column layouts. In a grid, gaps are subtracted before fr units share out the remaining space.

Example

The course's auto-fit column calculation adds one gap to the container width before dividing by the minimum track plus one gap.

Related terms

Taught in

References