Re: [csswg-drafts] [css-cascade][css-syntax] New `!revertable` flag to mark a declaration as "can be reverted when IACVT" (#10443)

@yisibl Yep, it is a “gotcha” based on how we serialize things, easily workaroundable as

```
.foo {
  color: green;
  & {
    color: var(--unknow, revert-rule);
  }
}
```

It will benefit from a note & example in the spec for sure.

- - - 

A really great point about preprocessors! They will need to learn not to remove/combine this for sure when minifying it. Some minifiers, for example, could keep both declarations but combine them into one rule, which will be incorrect.

That is workaroundable on the author's side by modifying one of the rules to be _different_, like

```CSS
.test {
  font-size: 36px;
  color: green;
}
.test:where(*) {
  color: var(--foo, revert-rule);
}
```

But it is something to watch out for.

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 29 January 2026 09:55:11 UTC