Cascade layers and scoping
Comes up in: Web fundamentals, Frontend system design
This concept is being written. It gets the full five steps — explanation, predict, interview angle, practice with tests, and review cards. Here is exactly what it will cover, so you can study it elsewhere in the meantime.
What it covers
@layerordering- layering resets/third-party/components/utilities
@scope(fact: support)- CSS Modules and CSS-in-JS trade-offs (runtime cost, RSC compatibility)
- BEM
Words you will know
What you will practise
- layer a stylesheet with a third-party library
Interview questions this answers
- How does the browser decide which CSS rule wins?
- CSS-in-JS vs CSS Modules vs utility CSS: what are the trade-offs?