Grids All The Way Down @rachelandrew at Frontend NE 2019
Slides & resources https://noti.st/rachelandrew
Slide 2
Hello Newcastle It’s nice to be home.
Slides & resources https://noti.st/rachelandrew
Slide 3
Doing things on the web since 1996 Co-founder Perch CMS & Notist. Editor in Chief Smashing Magazine. Writer of many books. CSS Working Group Member representing Fronteers. Spec editor Multicol and Page Floats. MDN tech writer.
Slides & resources https://noti.st/rachelandrew
Slide 4
CSS Grid Layout Two years on.
Slides & resources https://noti.st/rachelandrew
Slide 5
“I can make flexbox do anything. Why should I learn grid?”
Slides & resources https://noti.st/rachelandrew
Slide 6
“Should I use colour in this web design, or will fonts do?”
Slides & resources https://noti.st/rachelandrew
Slide 7
“Should I build my site using Flexbox or Grid?”
Slides & resources https://noti.st/rachelandrew
Slide 8
Stop thinking about Flexbox & Grid as two separate layout methods
Slides & resources https://noti.st/rachelandrew
Slide 9
Should I build my site using Flexbox or Grid?
YES.
Slides & resources https://noti.st/rachelandrew
Slide 10
Slides & resources https://noti.st/rachelandrew
Slide 11
Look at the pattern you need to build. That will tell you which layout method you need.
Slides & resources https://noti.st/rachelandrew
Slide 12
Flexbox when you have a bunch of different size stuff you want displayed in a readable way.
Slides & resources https://noti.st/rachelandrew
Slide 13
Slides & resources https://noti.st/rachelandrew
Slide 14
Grid for when you want to control the structure and place items into it.
Slides & resources https://noti.st/rachelandrew
Slide 15
Slides & resources https://noti.st/rachelandrew
Slide 16
If you are putting widths on all your flex items to make them line up. You probably want grid.
Slides & resources https://noti.st/rachelandrew
Two-dimensional Grid works in the same way in both axes.
Slides & resources https://noti.st/rachelandrew
Slide 22
Inline dimension: the grid fills the grid container
Block dimension: as tall as is needed for the content.
Slides & resources https://noti.st/rachelandrew
Slide 23
Inline dimension: the grid fills the grid container
Block dimension: the grid fills the grid container
Slides & resources https://noti.st/rachelandrew
Subgrid Create a grid on a grid item which uses the grid tracks defined on the parent – for rows, columns or both.
Slides & resources https://noti.st/rachelandrew
Line numbers start from 1 inside the subgrid. You position child items in the subgrid according to the subgrid line numbering, not those of the parent.
Slides & resources https://noti.st/rachelandrew
Line names on the parent are passed into the subgrid. If you have named lines on the parent grid they will be passed into the subgrid and added to any names defined there.
Slides & resources https://noti.st/rachelandrew
Write about features you want to see in browsers Write up your use cases, the problems having the feature will solve.
Slides & resources https://noti.st/rachelandrew
Slide 74
Use new features Browsers are watching.
Slides & resources https://noti.st/rachelandrew
Slide 75
Slides & resources https://noti.st/rachelandrew
Slide 76
Use new features when they are behind a flag You get to beta test the web platform!
Slides & resources https://noti.st/rachelandrew
Slide 77
Give feedback to the CSS Working Group https://github.com/w3c/csswg-drafts/issues
Slides & resources https://noti.st/rachelandrew
Slide 78
Slides & resources https://noti.st/rachelandrew
Slide 79
Participate in the web platform Or you are leaving your future as a designer or developer in the hands of the very few who do.
Slides & resources https://noti.st/rachelandrew
Slide 80
Thank you @rachelandrew
Slides & resources https://noti.st/rachelandrew