~/talk

The CSS Cascade, a deep dive

Talkat CSS Day 2022 · 2022-06-09..06-10· [css]
slides:none on file

Explains the cascade as a six‑step algorithm with a new layer step inserted before specificity and order‑of‑appearance, shows how to use @layer and the top‑of‑stylesheet layer order declaration, demonstrates that reusing layer names merges contents while anonymous layers do not, and that unlayered styles get ultimate priority. Gives browser support (Chromium/Chrome 99, Firefox 97, Safari 15.4), demos @import/@layer linking, the postcss polyfill for older browsers, and a bramus/specificity npm package for exact specificity math.

AI-written summary · about

  1. 0:00Start
  2. 3:53The CSS Cascade is the algorithm that determines the winner from a group of competing declarations
  3. 13:28Specificity
  4. 17:15ul li:is #highlighted, .active
  5. 23:07Introducing Cascade Layers
  6. 26:46With Cascade Layers you get to slice up single-origin styles in several layers, and control the priority of each layer
  7. 31:22Anonymous Layers
  8. 31:43Predefine Layer Order
  9. 32:09@layer Statement
  10. 32:53External CSS Files
  11. 35:05Layer Nesting
  12. 37:19Old Browsers
  13. 39:41Practical Application of Cascade Layers
  14. 40:45Summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.