By Manuel Rego.
Slides at http://people.igalia.com/mrego/talks/html5devconf-2015-css-grid-layout/#/
Layout on the web has been missing a proper solution for creating grid designs since the beginning. But this dark period is coming to an end with the new CSS Grid Layout spec. Grid layout is being implemented in every major web engine. The good news is that it will be hitting your browsers very soon.
During this talk we will not only review its syntax and main features, but also explain the internal details about what the browser has to do to render a CSS grid. After the talk, you'll be able to start playing with CSS Grid Layout, understanding the underlying steps involved, and provide feedback to the spec editors and browser implementors.
44. AUTO REPEAT EXAMPLE
.grid { display: grid;
grid-template-columns: repeat(auto-fill, 100px); }
<div class="grid">
<div>A</div>
<div>B</div>
<div>C</div>
<div>D</div>
<div>E</div>
</div>
A B C D E
61. LAYOUT ITEMS
Title
Nav Lorem ipsum dolor sit amet,
consectetur adipiscing elit,
sed do iusmod tempor incididunt
ut labore et dolore magna aliqua.
Ad
Adword
200px 130px470px
62. FIXED ROW
Title
Nav Lorem ipsum dolor sit amet,
consectetur adipiscing elit,
sed do iusmod tempor incididunt
ut labore et dolore magna aliqua.
Ad
Adword
200px 130px470px
100px
63. INTRINSIC ROW
Title
Nav
60px
Lorem ipsum dolor sit amet,
consectetur adipiscing elit,
sed do iusmod tempor incididunt
ut labore et dolore magna aliqua.
160px
Ad
Adword
60px
200px 130px470px
100px
auto
64. INTRINSIC ROW
Title
Nav Lorem ipsum dolor sit amet,
consectetur adipiscing elit,
sed do iusmod tempor incididunt
ut labore et dolore magna aliqua.
Ad
Adword
200px 130px470px
100px
160px
65. STRETCH ITEMS
Title
Nav Lorem ipsum dolor sit amet,
consectetur adipiscing elit,
sed do iusmod tempor incididunt
ut labore et dolore magna aliqua.
Ad
Adword
200px 130px470px
100px
160px
72. W3C SPECIFICATION
CSS Grid Layout - https://drafts.csswg.org/css-grid/
Started by Microsoft in 2010
Last Working Draft 17 September 2015
W3C Test Suite
74. BROWSERS ADOPTION ὠ
Old implementation
since IE 10
Prefixed: -ms
More complete
implementation
⚐Experimental Web
Platform Features
Enabled by default on
WebKit Nightlies
Prefixed: -webkit
Implementation started
early this year
⚐layout.css.grid.enabled
Polyfill: https://github.com/FremyCompany/css-grid-polyfill