Learning CSS. Rachel Andrew
Slides & resources https://noti.st/rachelandrew
Slide 2
Doing things on the web since 1996 Co-founder Perch CMS & Notist. Writer of many books. CSS Working Group Member. Spec editor Multicol and Page Floats. MDN tech writer.
Slides & resources https://noti.st/rachelandrew
Slide 3
I learn a thing. I write it down. I share it.
Slides & resources https://noti.st/rachelandrew
Slide 4
I thought that I had teaching CSS layout all figured out
Slides & resources https://noti.st/rachelandrew
Slide 5
Talking about CSS as a layout system
Slides & resources https://noti.st/rachelandrew
Slide 6
Talking about CSS as a layout system
Slides & resources https://noti.st/rachelandrew
Slide 7
As students today you have a massive advantage.
Slides & resources https://noti.st/rachelandrew
Slide 8
You can learn CSS in the same structured way as you learn any other language.
Slides & resources https://noti.st/rachelandrew
Slide 9
• • • • • • • • •
Flow Layout Changing the value of display Out of flow elements Block Formatting Contexts Writing Modes Logical, flow-relative properties and values Alignment Sizing Media & Feature Queries Slides & resources https://noti.st/rachelandrew
“[justify-content] does not apply to flex items, because there is more than one item in the main axis.”
Slides & resources https://noti.st/rachelandrew
“Prior to alignment via justifycontent and align-self, any positive free space is distributed to auto margins in that dimension.”
Slides & resources https://noti.st/rachelandrew
What is the inline-size or width of the box? By default, the content-box
Slides & resources https://noti.st/rachelandrew
Slide 75
If you want the specified width to include padding and border Set the box-sizing property to border-box.
Slides & resources https://noti.st/rachelandrew
Old browsers. They exist.
Slides & resources https://noti.st/rachelandrew
Slide 87
We have a specification. Some of it isn’t implemented yet.
Slides & resources https://noti.st/rachelandrew
Slide 88
Lack of support is very different to the buggy support of the past.
Slides & resources https://noti.st/rachelandrew
Slide 89
Media & Feature Queries How big is my viewport? Is this a touchscreen? Does this browser support Grid? Respond based on the answers.
Slides & resources https://noti.st/rachelandrew
Slide 90
Avoid resources describing CSS as a weird and quirky thing.
Slides & resources https://noti.st/rachelandrew
Slide 91
CSS is unlike other languages because it serves environments like no other.
Slides & resources https://noti.st/rachelandrew
Slide 92
Learn CSS as it is today.
Slides & resources https://noti.st/rachelandrew