[css-houdini-drafts] [css-properties-values-api] @property vs registerProperty (#845)

andruud has just created a new issue for https://github.com/w3c/css-houdini-drafts:

== [css-properties-values-api] @property vs registerProperty ==
I assume `@property` rules overwrite previous rules with the same name, e.g. if you specify the following, then `--x` is a `<length>`, and not a `<color>`:

```
@property --x { syntax: "<color>"; inherits: false; initial-value: red; }
@property --x { syntax: "<length>"; inherits: false; initial-value: 10px; }
```

However, what happens when `registerProperty` and `@property` are competing? Currently, `registerProperty` fails if something is already registered, yet for `@property` it's probably more natural that it re-registers the property.

Proposal:

 * `registerProperty` fails is the property is already registered, regardless of the origin of that registration.
 * `@property` will re-register the property if the current registration originated from `@property`, but fails (i.e. has no effect) if the current registration originated from `registerProperty`.

Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/845 using your GitHub account

Received on Wednesday, 12 December 2018 10:27:10 UTC