Grid
Grids layout your content into columns AND rows. They can be named, auto-generated to available space, and much more. The Parent container controls the size of its child cells.
Guides and Reference
Auto-Generate Rows/Columns with Available Space
.layout-grid {
display: grid;
grid-template-columns: repeat(
auto-fit,
minmax(
/* Minimum column size */
/* Smaller items (other than text) will resize to fit */
min(100%, 30ch),
/* Maximum column size */
1fr)
);
}Minimum
Maximum
Customize with Variables
References
Last updated