-
Notifications
You must be signed in to change notification settings - Fork 757
Description
In this issue, I use @property/syntax as an example and assume that it will be defined with <syntax> at some point, because <syntax> is otherwise only used in features that are not yet implemented in any browser.
@property --registered {
inherits: false;
initial-value: RED;
syntax: red;
}The above code results to an invalid rule in current version of Chrome and FF (at least).
The initial-value descriptor’s value must parse successfully according to the grammar specified by the syntax definition.
Aside: "parse" links to an incorrect algo, as reported in w3c/css-houdini-drafts#1111, if I am not mistaken.
However, this code results to a valid custom property value:
@property --registered {
inherits: false;
initial-value: red;
syntax: red;
}
div {
--registered: RED;
}Similarly, the new parse with a syntax algo is not quite clear on case-sensitivity:
- parse
valuesaccording tosyntax
Should it parse values case-insensitively, with the serialization of <syntax>, or against a grammar defined with enforced case-sensitivy because <syntax> produces <[custom-]ident>?
In hindsight, authors may or may not want case-sensitivite matching. For example, they might want case-sensitivity for animation-names, but case-insensitivity for color names.
Perhaps @property/case-sensitive defined as true | false (initial: true) may be a solution?