Re: [csswg-drafts] [css-specificity] Add specificity property modifier (replace !important) (#3890)

It's worth noting that we already have [a specificity adjustment mechanism](https://drafts.csswg.org/selectors/#zero-matches), and there was [a proposal](https://github.com/w3c/csswg-drafts/issues/1170#issuecomment-329877027) to extend it with an optional parameter for explicit specificity setting. However, the specificity itself is only the 3rd styles priority criterium [in the cascade](https://drafts.csswg.org/css-cascade-4/#cascading), following origin/importance and scope, so even the hypothetical `!specificity(Infinity)` would not override the animation styles defined in the same CSS file (as well as `!important` declarations from the same file!). That's why I'd say that the idea of creating [custom cascading levels](https://github.com/w3c/csswg-drafts/issues/1170) (or "origins") would be more interesting to explore.

-- 
GitHub Notification of comment by SelenIT
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3890#issuecomment-489307763 using your GitHub account

Received on Saturday, 4 May 2019 08:45:50 UTC