Learning to love CSS. Rachel Andrew @ c’t webdev
Slides & resources https://noti.st/rachelandrew
Slide 2
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 3
Slides & resources https://noti.st/rachelandrew
Slide 4
Slides & resources https://noti.st/rachelandrew
Slide 5
Slides & resources https://noti.st/rachelandrew
Slide 6
Slides & resources https://noti.st/rachelandrew
Slide 7
Slides & resources https://noti.st/rachelandrew
Slide 8
Slides & resources https://noti.st/rachelandrew
Slide 9
From <table> to CSS
Slides & resources https://noti.st/rachelandrew
Slide 10
Slides & resources https://noti.st/rachelandrew
Slide 11
Slides & resources https://noti.st/rachelandrew
Slide 12
Slides & resources https://noti.st/rachelandrew
Slide 13
The ‘Netscape Resize Fix’ Reloaded the browser window on resize, otherwise all positioned elements stacked up top left.
Slides & resources https://noti.st/rachelandrew
Slide 14
“He then employed the little-used CSS ‘float’ property to float the content to the desired width:”
Slides & resources https://noti.st/rachelandrew
Slide 15
Slides & resources https://noti.st/rachelandrew
Slide 16
The job of a web developer was as browser bug wrangler.
Slides & resources https://noti.st/rachelandrew
Slide 17
Slides & resources https://noti.st/rachelandrew
Slide 18
Frameworks helped busy teams deal with fragile CSS layout methods.
Slides & resources https://noti.st/rachelandrew
Slide 19
Slides & resources https://noti.st/rachelandrew
Slide 20
The Grid Layout spec Initial implementation in Internet Explorer 10.
Slides & resources https://noti.st/rachelandrew
Slide 21
Slides & resources https://noti.st/rachelandrew
Slide 22
A real layout system at the heart of CSS It’s more than just grid and flex.
Slides & resources https://noti.st/rachelandrew
Slide 23
Talking about CSS as a layout system
Slides & resources https://noti.st/rachelandrew
Slide 24
• • • • • • • • •
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 95
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 107
We have a specification. Some of it isn’t implemented yet.
Slides & resources https://noti.st/rachelandrew
Slide 108
Lack of support is very different to the buggy support of the past.
Slides & resources https://noti.st/rachelandrew
Slide 109
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 110
Contributing to the platform
Slides & resources https://noti.st/rachelandrew
Slide 111
Anyone can contribute to specifications You don’t need to be an Invited Expert or representative.
Slides & resources https://noti.st/rachelandrew
Slide 112
Slides & resources https://noti.st/rachelandrew
Slide 113
Everyone is allowed to contribute You don’t need permission, or to be qualified in some way.
Slides & resources https://noti.st/rachelandrew
Slide 114
Read and comment on specification issues https://github.com/w3c/csswg-drafts/issues
Slides & resources https://noti.st/rachelandrew
Slide 115
Slides & resources https://noti.st/rachelandrew
Slide 116
Show use cases As with any software development, real use cases are valuable.
Slides & resources https://noti.st/rachelandrew
Slide 117
Contribute examples and diagrams to specifications
Slides & resources https://noti.st/rachelandrew
It will probably take longer than you think for changes to be made! Patience is required for web platform contributions.
Slides & resources https://noti.st/rachelandrew
Slide 122
Raise browser bugs Fix bugs, or request that features are implemented.
Slides & resources https://noti.st/rachelandrew
Slide 123
Learn to create a Reduced Test Case
Slides & resources https://noti.st/rachelandrew
Slide 124
Slides & resources https://noti.st/rachelandrew
Slide 125
Test and offer feedback on features behind flags. This is the best time to make changes to a spec.
Slides & resources https://noti.st/rachelandrew
Slide 126
Slides & resources https://noti.st/rachelandrew
Slide 127
Web Platform Tests Help us test the web platform
Slides & resources https://noti.st/rachelandrew
Slide 128
Slides & resources https://noti.st/rachelandrew
Slide 129
Many people who work on CSS started by writing tests.
Slides & resources https://noti.st/rachelandrew
Slide 130
Comment on spec issues, raise new issues, contribute examples, raise browser bugs, write tests.
Slides & resources https://noti.st/rachelandrew
Slide 131
Everything has changed.
Slides & resources https://noti.st/rachelandrew
Slide 132
Nothing has changed. We need to work together to protect the open web platform.
Slides & resources https://noti.st/rachelandrew