If you work in web development learning CSS is not optional.
Slide 3
Revisit the things you already know
Slide 4
function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName==”Netscape”)&&(parseIn t(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload() ; } MM_reloadPage(true);
Slide 5
It’s true! Some things in CSS have weird names, strange casing, and odd rules.
Slide 6
We can’t break the web
Slide 7
Slide 8
Naming things is hard
Slide 9
Writing Modes A writing-mode agnostic way of working.
Slide 10
Block
Inline
Slide 11
Inline
Block
Slide 12
Block start
Inline start
Inline end
Block end
Slide 13
Web layout is tied to physical dimensions We think in top, right, bottom, left, width, height.
Slide 14
.example { width: 600px; height: 300px; }
Slide 15
Height
Width
Slide 16
Logical Properties & Values Mapping the physical to the flow-relative.
“
[justify-self] does not apply to flex items, because there is more than one item in the main axis.” https://drafts.csswg.org/css-align/#justify-flex
”
Slide 78
.example { align-self: center; }
Slide 79
justify-
• Main axis alignment in flexbox (the direction of flex-direction) • Flexbox only supports justify-content (not justify–items or justify–self) • Inline axis alignment in grid
Slide 80
align-
• Cross axis alignment in flexbox • Block axis alignment in grid
Slide 81
-content
• Space distribution between flex items or grid tracks • No spare space and these properties do nothing
Slide 82
-items, -self
• Alignment within the grid area • Alignment against other flex items on the cross axis
Slide 83
Box sizing https://drafts.csswg.org/css-sizing-3/
Slide 84
What about the Box Model? Isn’t there a rule that anyone talking about CSS must show a box model diagram?
Slide 85
When we had to control the size of each item in a layout, the Box Model was very important.
Slide 86
Slide 87
Slide 88
Slide 89
Slide 90
Slide 91
What is the inline-size or width of the box? By default, the content-box
Slide 92
If you want your specified width to include padding and border… … set the box-sizing property to border-box.
Slide 93
.example { box-sizing: border-box; }
Slide 94
In the past everything was a length or a percentage.
Slide 95
What is the minimum and maximum size of this thing
Slide 96
Slide 97
Any content-based sizing is worked out based on these min and max content sizes.