Olea Ovidiu
Html Table
Box model
FlexBox
CSS Grid
Source:http://bit.ly/2p5xI9X
The dividing lines that make up the structure of the grid. They can be either vertical ("column grid lines") or horizontal ("row grid lines") and reside on either side of a row or column. Here the yellow line is an example of a column grid line.
The space between two adjacent grid lines. You can think of them like the columns or rows of the grid. Here's the grid track between the second and third row grid lines.
The space between two adjacent row and two adjacent column grid lines. It's a single "unit" of the grid. Here's the grid cell between row grid lines 1 and 2, and column grid lines 2 and 3.
grid-template
grid-template-columns
grid-template-rows
grid-gap
grid-column-gap
grid-row-gap
justify-items
align-items
grid-column-start
grid-column-end
grid-column
grid-row
justify-self
align-self
Properties for the Parent
(Grid Container)
Properties for the Children
(Grid Items)
Grid lines
Grid lines properties
Implicit Number:
Explicit Name:
grid-template-rows: 10% 40% auto;
1 2 3
grid-template-rows: [sidebar] 10% [content] 40% [sidebar] auto [last-line];
Content Align properties
Align Rows:
Align Columns:
justify-items - align all the rows
align-items - align all the columns
justify-self - align single row
align-self - align single column
The element on which display: grid is applied. It's the direct parent of all the grid items. In this example container is the grid container.
<div class="container">
<div class="item-1"></div>
<div class="item-2"></div>
<div class="item-3"></div>
</div>
.container {
display:grid;
}
Grid Container
Grid Items
.container {
grid-template: grid-template-rows / gird-template- columns;
}
.item-a {
grid-column: <start-line> / <end-line> | <start-line> / span <value>;
grid-row: <start-line> / <end-line> | <start-line> / span <value>;
}
Shorthand for gird-templates-columns & grid-templates-row
Shorthand for grid-column-start / end & grid-row-start / end
CSS functions
The repeat() CSS function represents a repeated fragment of the track list, allowing a large number of columns or rows that exhibit a recurring pattern to be written in a more compact form.
.container {
grid-template: repeat(2, 50%) / repeat(2, 50%);
}
.container {
grid-template-column: repeat(2, 50%);
grid-template-row: repeat(2, 50%);
}
Grid inspector tool lets you see the grid lines in the browser while you’re creating a layout or studying other examples of CSS Grid in action. In fact, this entire page was laid out using CSS Grid.
Firefox:
Chrome: (Gridman Extension)
(DEMO)
(DEMO)
Clarity/Order - Grids bring order to a layout making it easier for visitors to find and navigate through information.
Efficiency - Grids allow designers to quickly add elements to a layout because many layout decisions are addressed while building the grid structure.
Economy -Grids make it easier for other designers to work and collaborate on the design as they provide a plan for where to place elements.
Consistency/Harmony — Grids lead to consistency in the layout of pages across a single site or even several sites creating a structural harmony in the design.
Learn CSS Grid: