Hacker News new | ask | show | jobs
by TAKEMYMONEY 1544 days ago
> Let’s take a look at the different tiers of the Cascade

Bad way of framing this, the navigation and phrasing makes it sound like we're going from least to most specific as we scroll down the page but we're not.

> The hierarchy here is actually reversed for !important rules, meaning that an !important browser default rule wins over an !important website rule

I think this would be difficult for a beginner or even intermediate to understand. This chart does a much clearer jobs including every layer of specificity (including with @layer): https://webkit.org/wp-content/uploads/cascade-layers-2048x11...

I appreciate going for an approachable fun way to deliver a dry, complicated topic. Maybe look at how MDN writes about this stuff and get some of the specifics/technicals nailed down a little more.

https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_...

1 comments

having hard time to think of any default browser rules that use !important, any ideas?
Fullscreen iframes definitely don’t have a border in Firefox, among others.

https://searchfox.org/mozilla-central/source/layout/style/re...