How does !important actually work? (It's not what you think!)
source link: https://www.youtube.com/watch?v=dS123IXPcJ0
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
2.98K subscribers
CSS !important does more than just increase the important of a style rule, it inverts the CSS cascade! Learn what exactly that means in this week's video
(NOTE: Most of the time I say "rule" in this video, I mean "declaration". "Rule" in CSS includes the selector, declaration is the property/value pair)
Links: My previous video on cascade layers: https://youtu.be/ilrPpSQJb3U Article on Cascade Layers: https://developer.chrome.com/blog/cas... Short !important demo: https://codepen.io/una/pen/xxPGNyV Cascade Layers Explainer: https://css.oddbird.net/layers/explai...
Show less
Show more
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK