New color functions color-mix() and color-contrast()
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
li { color: color-contrast(var(—background) vs #000, #fff); }
Slide 12
Try out color-contrast() In Safari Technology Preview enable CSS color-contrast() in the develop menu
Slide 13
Solving font layout shifts size-adjust, ascent-override, descent-override, line-gap-override
Container Queries Design components that can react to the available space in their container.
Slide 35
Slide 36
Try out Container Queries In chrome://flags enable “CSS Container Queries” or use Safari 16 beta, or Safari Technology Preview.
Slide 37
.sidebar { container-type: inline-size; }
Slide 38
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.