- From: Lea Verou via GitHub <sysbot+gh@w3.org>
- Date: Sat, 29 Jul 2017 09:37:58 +0000
- To: public-houdini-archive@w3.org
LeaVerou has just created a new issue for https://github.com/w3c/css-houdini-drafts: == [css-properties-values-api] inherits should be true by default == Spec section: https://www.w3.org/TR/css-properties-values-api-1/#registering-custom-properties I just had a rather confusing experience using `CSS.registerProperty()` to make a property animatable. For reference, my code was: ```js CSS.registerProperty({ name: "--x", syntax: "<number>", initialValue: "0" }); ``` My CSS thus far had been designed with the assumption that the property inherits, which is the default behavior of custom properties. Once `CSS.registerProperty()` was used, suddenly various parts of my CSS code stopped working. At first I thought I was dealing with an implementation bug! Eventually I realized that `inherits` is false by default, so my property had stopped inheriting even though I hadn't declared anything about inheritance. Given that any unregistered properties inherit by default, it doesn't make sense to have a different default for registering properties. I suspect many future authors will face the same confusion as I just did. The defaults of `CSS.registerProperty()` should be those that cause no changes for things that have not been explicitly specified, whenever possible. Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/434 using your GitHub account
Received on Saturday, 29 July 2017 09:38:00 UTC