Rachel Andrew Technical writer for Chrome. Content lead web.dev and developer.chrome.com. CSS Working Group member.
Slide 3
CSS is amazing right now!
Slide 4
Slide 5
Use your brand color in form inputs. accent-color
Slide 6
input { accent-color: var(—blue-sapphire); }
Slide 7
Use accent-color now!
Slide 8
New color functions color-mix()
Slide 9
li { background-color: color-mix(in lch, white 10%, darkblue); }
Slide 10
Try out color-mix() In Safari Technology Preview enable CSS color-mix() in the develop menu In Firefox, in about:config enable layout.css.color-mix.enabled
Slide 11
Solving font layout shifts size-adjust, ascent-override, descent-override, line-gap-override
Use size-adjust, ascent-override, descent-override, and line-gap-override now!
Slide 14
Controlling specificity @layer
Slide 15
@layer base special @layer special { .item { color: rebeccapurple; } } @layer base { .item { color: green; } }
Slide 16
Use Cascade Layers now!
Slide 17
Small, large, and dynamic viewport units Units that account for mobile viewports with and without UI elements.
Slide 18
Viewport concepts
• Large viewport: the viewport with no dynamic UI elements visible. • Small viewport: the viewport with the dynamic UI elements visible.
CSS Containment This box and children are independent from the rest of the layout.
Slide 36
.sidebar { contain: layout; }
Slide 37
Use the contain property now!
Slide 38
Container Queries Design components that can react to the available space in their container.
Slide 39
Slide 40
.sidebar { container-type: inline-size; }
Slide 41
Using container-type creates a containment context. This also turns on layout, style, and inline-size containment, in the same way as using the contain property does.