- From: Jeffrey Yasskin via GitHub <noreply@w3.org>
- Date: Tue, 17 Feb 2026 18:36:23 +0000
- To: public-css-archive@w3.org
jyasskin has just created a new issue for https://github.com/w3c/csswg-drafts:
== [css-cascade-5] How does 'revert' interact with !important? ==
The 'revert' value is [defined](https://drafts.csswg.org/css-cascade-5/#default) as
> The revert [CSS-wide keyword](https://drafts.csswg.org/css-values-4/#css-wide-keywords) rolls back the cascade to the [cascaded value](https://drafts.csswg.org/css-cascade-5/#cascaded-value) of the earlier [origin](https://drafts.csswg.org/css-cascade-5/#origin).
>
> <dl>
> <dt>user-agent origin
> <dd>Equivalent to unset.
>
> <dt>user origin
> <dd>Rolls back the cascaded value to the user-agent level, so that the specified value is calculated as if no author-origin or user-origin rules were specified for this property on this element.
>
> <dt>author origin
> <dd>Rolls back the cascaded value to the user level, so that the specified value is calculated as if no author-origin rules were specified for this property on this element. For the purpose of revert, this origin includes the Animation origin.
>
> </dl>
As y'all know (better than I do!), [`!important`](https://drafts.csswg.org/css-cascade-5/#importance) reverses the order of the cascade origins. If someone writes, especially in a user stylesheet:
```css
a {
color: blue !important
}
.special-element a {
color: revert !important
}
```
Should that revert to the author or UA stylesheet? The current definition is clear that it reverts to the UA stylesheet, but as that's not quite "the earlier origin" for `!important` rules, it probably deserves a note if it's what y'all intended.
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13510 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 17 February 2026 18:36:23 UTC