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
- CSS Grid — A CSS layout mode that places a container's children into rows and columns.
- fr unit — A CSS Grid unit meaning one share of the space left after fixed-size tracks and gaps have been taken out.
Taught in
- Advanced CSS Grid: Named Areas, minmax And auto-fit — Frontend Architecture & Web Platform