- From: Lea Verou via GitHub <noreply@w3.org>
- Date: Thu, 04 Dec 2025 15:53:59 +0000
- To: public-houdini-archive@w3.org
@AtkinsSJ
> Perhaps the default values should match how an unregistered custom property behaves? Or at least as close as possible.
Yup. That’s on par with the [principle of least surprise](https://en.wikipedia.org/wiki/Principle_of_least_astonishment): you declare the things that are different from the default behavior, rather than having a bunch of things change that you did not declare, requiring you to write extra code to go back to the default behavior.
> `initial-value` is the only part that's tricky there I think as it would be the `<guaranteed-invalid-value>` which isn't representable, though it is already the default if it's not specified.
>
> So these would be equivalent:
>
> @property --a {};
>
> @property --a {
> inherits: true;
> syntax: "*";
> /* initial-value: guaranteed-invalid-value; */
> };
Ooh I really, _really_ like this. Currently there is no way to register a custom property and still have fallbacks, which limits what you can do with it. This would solve that AND the ergonomics issue in one fell swoop.
----
@SebastianZ
> What is the obvious reasonable default value? For me, it would be _not_ to inherit, as most of the properties I define don't need to inherit. (And yes, that goes against how unregistered properties behave, so against what [@AtkinsSJ](https://github.com/AtkinsSJ) [wrote](https://github.com/w3c/css-houdini-drafts/issues/1162#issuecomment-3611356552).) But I get the point that it would be more consistent to let them inherit by default.
See above.
Also I would question how universal this is:
> For me, it would be _not_ to inherit, as most of the properties I define don't need to inherit.
This has not been my experience, at all. Most of the properties I define _do_ need to inherit.
> Either way, I don't get the argument why that should be more expensive. If it's to inherit by default, then it's not different to declaring them via declarations, which is what authors usually do. And _not_ inheriting by default sounds less expensive to me. So maybe you or [@tabatkins](https://github.com/tabatkins) could provide some background here?
IIRC inheriting was more expensive. I agree it's no different to declaring them via declarations. Perhaps @tabatkins can clarify.
--
GitHub Notification of comment by LeaVerou
Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/1162#issuecomment-3612929001 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 15:54:00 UTC