- From: Roman Komarov via GitHub <sysbot+gh@w3.org>
- Date: Thu, 10 Oct 2024 18:48:34 +0000
- To: public-css-archive@w3.org
Good question! For registered custom properties, things should be relatively straightforward and work as for any other custom properties. In your example it will be `0`, as no `--registered` is defined with a valid value, and if we will have something like:
```CSS
.example {
--registered: 1;
--IACVT: max(invalid);
--registered: var(--IACVT) !revertable;
}
```
then it will revert to `1`.
For unregistered custom properties, the most logical thing to do is to treat them as they're treated now: always valid until used, in the same way it currently “taints” any declaration making fallbacks impossible (and for which we'll have `first-valid()` — https://github.com/w3c/csswg-drafts/issues/5055).
I don't know if it is currently possible to determine if an unregistered custom property is invalid _before_ using it? If so, I can see it useful to be able to revert to previous values when doing `!revertable`. Otherwise it will be useless, and making it work this way should not break anything, as `!revertable` is itself new, so we can define how it works for this case (again, if this is technically possible/feasible).
--
GitHub Notification of comment by kizu
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10443#issuecomment-2405814725 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 10 October 2024 18:48:35 UTC