grid-template-areas
The CSS Grid property that names regions of the grid with a visual text map, such as "header header" "sidebar main", so items can be placed by name.
In more detail
Each string is a row and each word a cell; a full stop marks an empty cell. Items then use grid-area: main instead of fragile line numbers, and rearranging the map at a breakpoint rearranges the layout.
Example
grid-template-areas: "header header" "sidebar main" ". footer";Related terms
- CSS Grid — A CSS layout mode that places a container's children into rows and columns.
- grid track — One row or one column of a CSS grid, the space between two neighbouring grid lines.
Taught in
- Advanced CSS Grid: Named Areas, minmax And auto-fit — Frontend Architecture & Web Platform