Re: [css-houdini-drafts] [css-properties-values-api] Allow custom properties to be used for initial-value inside @property (#1140)

Furthermore, you cannot even use one `@property` variable as an input to another, even if defined with `@property`

```
@property --foo {
  inherits: true;
  initial-value: red;
  syntax: '<color>';
}

@property --bar {
  inherits: true;
  initial-value: var(--foo);
  syntax: '<color>';
}
```

So it becomes quite tricky to build up a set of variables (say for a design system) that may reference each other, without duplicating information in `:root`

I wonder what the spec says about this. Is `@property` supposed to be a replacement for `:root`, or more a way to annotate it? If the latter, I don't think `initial-value` should be required, as it is now.

-- 
GitHub Notification of comment by jedrichards
Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/1140#issuecomment-2888812469 using your GitHub account


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

Received on Sunday, 18 May 2025 06:51:49 UTC