TIL of a visual way to see CSS Cascade
POSTED ON:
Ever wonder what gets priority?
Ever wish it was in a funnel?
Why is this useful?
Because when you're writing CSS, there's a specificity. MDN
As your CSS starts to grow, things can get real hairy real fast, and you start scoping your CSS. Some of you may even tack on hacks like !important.
And you can do weird stuff like do it's specificity weight.
But then questions start arising: will !important be higher priority than say, the Shadow DOM generated object?
This funnel clears that up!
Related TILs
Tagged: css