Engrain by ByteRush

WEB.08 3 concepts · 2 ready

CSS in depth I: the cascade and modern selectors

Predict which styles apply and organise CSS at scale.

  1. WEB.08.01The cascade, specificity and inheritanceCoreMid-level11 min
  2. WEB.08.02Cascade layers and scopingMid-levelBeing written
  3. WEB.08.03Custom properties and modern selectorsCoreMid-level11 min

Interview questions in this module

  1. How does the browser decide which CSS rule wins?
  2. How is specificity calculated?
  3. What are cascade layers and what problem do they solve?
  4. What is the difference between :is() and :where()?
  5. What can :has() do that was impossible before?
  6. CSS-in-JS vs CSS Modules vs utility CSS: what are the trade-offs?