4 ms·
I mean, the top just happens because color has 'inherit' by default. The latter is specificity, and normally what I think of when I hear "cascading". But, it tu
by doix 3y ago
I mean, the top just happens because color has 'inherit' by default. The latter is specificity, and normally what I think of when I hear "cascading". But, it turns out that isn't cascading either [0].
Cascading refers to the order stylesheets have priority when loaded by the browser. Going to have to update my definitions for the future. I always thought cascading referred to how specificity worked.
Edit: no wait, specificity is part of cascading, cascading refers to the entire process of determining which style applies, including specificity. Inheritance on the other hand is not part of cascading. My definitions were right, don't need to relearn anything.
[0] https://developer.mozilla.org/en-US/docs/Web/CSS/Cascade https://developer.mozilla.org/en-US/docs/Web/CSS/Cascade
- gnagatomo 3y ago>But, it turns out that isn't cascading either The order in which stylesheets are loaded and it's origin is just part of the cascading algorithm. See the "Cascading order" section https://developer.mozilla.org/en-US/docs/Web/CSS/Cascade#cascading_order https://developer.mozilla.org/en-US/docs/Web/CSS/Cascade#cas...
- danielvaughn 3y agoIn truth everything mentioned above is part of the overall cascade. CSS takes almost everything into account - stylesheet ordering, rule ordering, rule specificity, etc.