w3c / css-houdini-drafts

Mirror of https://hg.css-houdini.org/drafts
https://drafts.css-houdini.org/
Other
1.84k stars 141 forks source link

[css-properties-values-api-1] Multiple custom `@property` with the same name #1113

Closed cdoublev closed 1 month ago

cdoublev commented 1 year ago

This suggests that they are equivalent to running multiple registerProperty() with the same name:

Valid @property rules result in a registered custom property, as if registerProperty() had been called with equivalent parameters.

https://drafts.css-houdini.org/css-properties-values-api/#at-property-rule

I suggest that you make it clear that @property can override a definition, which I understood from reading other issues, whereas registerProperty() can not:

If property set already contains an entry with name as its property name (compared codepoint-wise), throw an InvalidModificationError and exit this algorithm.

cdoublev commented 1 month ago

This is clearly stated. My apologies.