- From: Oriol Brufau via GitHub <noreply@w3.org>
- Date: Thu, 11 Dec 2025 17:38:55 +0000
- To: public-houdini-archive@w3.org
> The same thing that makes an unregistered property exist for real
It's not the same thing, because for unregistered, the logic is that the value is not the guaranteed-invalid value. E.g. this is false:
```html
<!DOCTYPE html>
<style>:root { --foo-bar: initial }</style>
<script>
// This is false, the value is the guaranteed-invalid value
document.documentElement.textContent =
[...getComputedStyle(document.documentElement)].includes("--foo-bar");
</script>
```
For mass registered properties whose initial value is not the guaranteed-invalid value, the above doesn't work. So instead of checking the computed style, we need to check the cascade. And then this would be true?
```html
<!DOCTYPE html>
<style>
@property --foo-* { syntax: "<number>"; initial-value: 1; inherits: true }
:root { --foo-bar: initial }
</style>
<script>
// This is true, the property is specified
document.documentElement.textContent =
[...getComputedStyle(document.documentElement)].includes("--foo-bar");
</script>
```
And what about inheritance? Does the property count as specified if it inherits from an ancestor where it's actually specified?
And what about `revert` & friends, do they count as specifying, or can they undo the specification of the property?
--
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/1058#issuecomment-3643038099 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 11 December 2025 17:38:56 UTC