- From: Monknow via GitHub <sysbot+gh@w3.org>
- Date: Tue, 25 Jun 2024 12:14:32 +0000
- To: public-css-archive@w3.org
> I wonder if it would make more sense to add an entirely new rule like > ```css > @revertable #foo { > height: 1px; > block-size: 2px; > height: var(--invalid); >} >``` Even if an at-rule and a `!`-flag are both present after parse time, I think an at-rule would prompt users to put all their styles inside the block, instead of narrowing down which properties they want to enforce the revertable behavior. Besides, as specified on the original issue at [#5319](https://github.com/w3c/csswg-drafts/issues/5319), the fallback property may be on another CSS rule (or even on third-party styles), like the following: ```html <p class="lorem">Lorem ipsum dolor</p> ``` ```css p { background-color: red; // declaration gets thrown away } .lorem { background-color: var(--not-a-color); // declaration is IACVT } ``` If the rule with the IACVT is more specific, the declaration on the lesser specific rule gets thrown away. If I understand your approach correctly, both declarations would need to be in the at-rule, which is harder if they are in different rules. I think putting a `!`-flag (or even the initial proposal for a keyword) after the custom property that may be IACVT is cleaner and gives the user the necessary control. -- GitHub Notification of comment by Monknow Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10443#issuecomment-2188778352 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 25 June 2024 12:14:33 UTC