Check that <custom-ident> implementation matches the spec, once the spec is settled
Categories
(Core :: CSS Parsing and Computation, defect, P5)
Tracking
()
People
(Reporter: SimonSapin, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-needed)
Reporter | ||
Updated•11 years ago
|
Comment 1•11 years ago
|
||
Reporter | ||
Comment 2•11 years ago
|
||
Comment 3•11 years ago
|
||
Reporter | ||
Comment 4•11 years ago
|
||
Updated•11 years ago
|
Comment 5•11 years ago
|
||
Comment 6•11 years ago
|
||
Comment 7•9 years ago
|
||
Reporter | ||
Comment 9•4 years ago
|
||
When designing grammars with <custom-ident>, the <custom-ident> should always […]
This is a "should" requirement for CSS specifications, which Grid happens to violate since span
in some positions is ambiguous.
The part of https://drafts.csswg.org/css-values-3/#custom-idents relevant to implementations (though it may have changed since previous comments here) is:
When parsing positionally-ambiguous keywords in a property value, a <custom-ident> production can only claim the keyword if no other unfulfilled production can claim it.
For example, the shorthand declaration animation: ease-in ease-out is equivalent to the longhand declarations animation-timing-function: ease-in; animation-name: ease-out;. ease-in is claimed by the <easing-function> production belonging to animation-timing-function, leaving ease-out to be claimed by the <custom-ident> production belonging to animation-name.
This says that span span
should not be a parse error. Instead the ambiguity should be resolved by making the first span
resolve as a keyword (since that grammar production is at that point unfullfilled), and the second one as a <custom-ident>
(since by then that is the only remaining grammar production).
This "priority" is more important in e.g. span 2
where we want to parse the span
keyword and not a custom identifier.
Updated•2 years ago
|
Description
•