All notes
TypographyOpinion

Why we stopped fighting the cascade

Cascade layers gave us the one thing scoped styles never did: a predictable order we chose ourselves.

By Nadia Brandt7
Waterfall cascading over rocks surrounded by greenery

For years the answer to specificity was to avoid it. Flatten everything, scope everything, never let two rules meet. It worked, in the way that never leaving the house works.

Layers change the argument

Declare the order once at the top of the sheet and the fight is over. Resets lose to components, components lose to utilities, and no one needs to count selectors ever again.

Less machinery

We removed a build step and a naming convention in the same week. The stylesheet got longer and much easier to read, which is a trade we would take again.

The cascade was never the problem. Not being able to see it was.

Keep reading