You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For revert-layer in important element-attached styles, however, it only reverts the element-attached styles and the intervening animation origin, and not any of the intervening author-origin important rules.
Suggestion to update the spec to the following, dropping the word “important”:
For revert-layer in element-attached styles, however, it only reverts the element-attached styles and the intervening animation origin, and not any of the intervening author-origin important rules.
The text was updated successfully, but these errors were encountered:
@bramus Both revert to styles within the author origin. That note is specifically about how to deal with intervening important rules. In the example you linked -- and always when the inline styles are not marked as important -- there are no intervening important rules:
- !important UA origin
- !important User origin
- !important Element attached (reverting from here…) ⏪
- !important Lowest Layer (…maintains these layers)
- !important Highest Layer (…)
- !important No Layer (…)
- Animation origin (…but would revert this one) ❌
- Element attached (…and this one. But the linked WP test starts here…) ❌
- No Layer (…and ends up here, which is also correct)
- Highest Layer
- Lowest Layer
- Presentation hints
- User origin
- UA origin
As per https://drafts.csswg.org/css-cascade-5/#revert-layer,
revert-layer
in important element-attached styles should revert back to the author origin:https://wpt.live/css/css-cascade/revert-layer-009.html however seems to imply this is also the case for regular element-attached styles, with all vendors agreeing on this behavior.
Suggestion to update the spec to the following, dropping the word “important”:
The text was updated successfully, but these errors were encountered: