w3c/css-houdini-drafts

[css-properties-values-api] Clarify parsing of duplicate descriptor declarations

cdoublev opened this issue · 0 comments

I am sorry because the following situation is rather unlikely...

@property --custom {
  inherits: false;
  syntax: '<length>';
  syntax: '<unsupported>';
  initial-value: 1;
  initial-value: 1px;
}

... but is it an invalid custom @property registration?

The initial-value descriptor’s value must parse successfully according to the grammar specified by the syntax definition. [...] If the above conditions are not met, the @property rule is invalid.

I suggest to add something similar to this in the introduction of 3. The @property Rule (or even better, in CSS Syntax):

Descriptor declarations in @property are parsed like property declaclarations in a style rule: if a descriptor is declared multiple time with a valid value, only the last declaration remains.