Open upsuper opened 6 years ago
Actually, it may be unrelated to css-animations at all. CSS Syntax also mentions
If they don’t interact with the cascade, properties containing !important are automatically invalid;
So probably CSSOM should say that if !important
is invalid in a declaration block, "set a CSS declaration priority" fails or is ignored.
Thanks for the clarification. Note for keyframes rules; 1) Chromium does not fail setProperty with 'important' and handles the property as if it's not 'important' 2) Firefox does not fail setProperty with 'important' and handles the new property in the keyframe is invalid (which means the new property overrides the old one).
Either does not comply the spec?
In CSS Animations spec, it is mentioned that
However, the important flag can still be set via
CSSStyleDeclaration
'ssetProperty
andsetPropertyPriority
.Probably the "set a CSS declaration priority" algorithm should ignore when the declaration block is from a keyframe rule.
cc @hiikezoe