Re: [csswg-drafts] [css-properties-values-api] `@property` descriptors should be optional whenever possible (#13211)

> If so, what should be the default value? (Guaranteed invalid seems the best proposal so far)

Guaranteed invalid is probably the easiest choice. But it could be more useful for authors if we pick the initial value depending on the syntax, e.g.

 - `*` and `<custom-ident>` default to guaranteed invalid
 - `<number>` and `<integer>` default to `0`
 - Dimensions default to have a numerical value of zero. The unit shouldn't matter, but could pick the canonical one if needed. E.g. `<length>` would default to `0px`.
 - `<percentage>` defaults to `0%`
 - `<length-percentage>` defaults to `0px`
 - `<string>` defaults to `""`
 - `<color>` defaults to `transparent`. Or maybe solid `black`?
 - `<url>` and `<image>` default to `url()`
 - `<transform-function>` defaults to `scale(1)` or similar
 - If there is a `|` combinator, default to the left hand side
 - If there is a `+` or `#` multiplier, the default is a list of 1 item

-- 
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13211#issuecomment-3647134189 using your GitHub account


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

Received on Friday, 12 December 2025 15:53:45 UTC