Re: [css-houdini-drafts] [css-properties-values-api] Mass property registration (#1058)

There is another proposal here: https://github.com/w3c/csswg-drafts/issues/7523#issuecomment-1683831209 (based on Tab's post immediately before):

```css
@property {
  syntax: "<length>";
  inherits: false;
  initial-value: 2147483647px;
  --width: initial; /* 2147483647px */
  --height: initial; /* 2147483647px */
  --depth: 0px;
}
```

And/or we could imagine that a hypothetical `initial()` function is allowed here, to be able to express an initial value in terms of other initial values:

```css
@property {
  syntax: "<length>";
  inherits: false;
  --one: 1px;
  --two: 2px;
  --width: initial(--one);
  --height: initial(--two);
  --foo: calc(initial(--one) + initial(--two));
}
```

That would require a novel concept of "computing" an _initial_ value, but that should be possible as long as everything is [computationally independent](https://drafts.css-houdini.org/css-properties-values-api-1/#computationally-independent) otherwise.

---

Mass registration with wildcards: so ... `@property --int-*` is basically something like a "selector" that "matches" custom property names on that form? I'm not sure if it's wise to bake that much (potentially expensive) complexity into the the computed value process. Hopefully we can consider other ways to solve the use-cases this would be needed for. For example, custom functions/`if()` could help for some of them?

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


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

Received on Thursday, 4 December 2025 00:19:17 UTC