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

> specificity of properties is a 5-dimensional value

Not exactly. It's often taught to the beginners that way for simplicity, but the CSS Cascade spec defines the "Origin and Importance" and "Specificity" [as two separate criteria](https://drafts.csswg.org/css-cascade-4/#cascading) of the declaration precedence. Adding "!important" effectively changes the first one, but even `!important` author styles still can't override `!important` user agent styles, and transition styles override everything (so setting a transition with a huge delay would effectively make any CSS value unchangeable).

So adding only extra importance levels without adding new "origins" would not allow, e.g., making a declaration's priority higher than any non-important author style (to prevent accidental overriding) but lower than animation declarations (to keep them animatable).

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

Received on Thursday, 9 April 2020 10:26:00 UTC