container
display
Establishes a new grid formatting context for children.
grid-template
Defines the rows and columns of the grid.
grid-template-columns: 12px 12px 12px;
grid-template-rows: 12px 12px 12px;
grid-template-columns: repeat(3, 12px);
grid-template-rows: repeat(3, auto);
grid-template-columns: 8px auto 8px;
grid-template-rows: 8px auto 12px;
grid-template-columns: 22% 22% auto;
grid-template-rows: 22% auto 22%;
grid-gap
Specifies the size of column and row gutters.
grid-row-gap: 1px;
grid-column-gap: 9px;
justify-items
Aligns content in a grid item along the row axis.
justify-items: stretch; (default)
align-items
Aligns content in a grid item along the column axis.
align-items: stretch; (default)
justify-content
Justifies all grid content on row axis when total grid size is smaller than container.
justify-content: stretch;
justify-content: space-around;
justify-content: space-between;
justify-content: space-evenly;
align-content
Justifies all grid content on column axis when total grid size is smaller than container.
align-content: space-around;
align-content: space-between;
align-content: space-evenly;
grid-auto-flow
Algorithm for automatically placing grid items that aren't explictly placed.
children
grid-column
Determines an items column-based location within the grid.
grid-column-start: 1;
grid-column-end: 3;
grid-column-start: span 3;
grid-column-start: 2;
grid-column-end: 4;
grid-row
Determines an items row-based location within the grid.
grid-row-start: 1;
grid-row-end: 3;
grid-row-start: 2;
grid-row-end: 4;
grid-row + grid-column
Combining grid rows with grid columns.
grid-row: 1 / span 2;
grid-column: 1 / span 2;
grid-row: 2 / span 2;
grid-column: 2 / span 2;
justify-self
Aligns content for a specific grid item along the row axis.
justify-self: stretch; (default)
align-self
Aligns content for a specific grid item along the column axis.
align-self: stretch; (default)