While Cascade Origins help to balance styling concerns across stakeholders – layering browser defaults, user preferences, and document styles – it can be useful to have similar layering of concerns within a single origin. Author styles often start with browser normalization or resets, then layer in default typography, broad patterns (sometimes from design systems or frameworks), and more specific component styles.
Currently that layering has to be achieved with careful management of selector-specificity,
or over-use of
!important flags – both resulting in unwanted side-effects.
Cascade Layers would allow authors to define their own layering scheme
and avoid specificity or source-order conflicts across concerns.
My Notes ¶
- MDN documentation by Rachel Andrew
- Can I use…
- Web Platform Tests
(Cascade Layer tests all begin with the
- Mozilla Layers
- Webkit Layers
CSS Cascade Layers)
- Chromium Layers
Enable CSS Cascade Layers)
Talks & Podcasts ¶
- CSSWG Proposals
- Styling the Intrinsic Web (slides)
- Front End Nerdery
- Container Queries & The Future of CSS (slides)
- Word Wrap Show
- The F-Word
- Smashing Podcast