Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-syntax] "Consume a declaration" (5.5.6) leaves out a final "else" condition? #10353

Open
amn opened this issue May 20, 2024 · 0 comments
Open

Comments

@amn
Copy link

amn commented May 20, 2024

Under list of steps described by 5.5.6 "Consume a declaration", point 8 says:

If decl’s name is a custom property name string, then set decl’s original text to the segment of the original source text string corresponding to the tokens of decl’s value.

Otherwise, if decl’s value contains a top-level simple block with an associated token of <{-token>, and also contains any other non- value, return nothing. (That is, a top-level {}-block is only allowed as the entire value of a non-custom property.)

Otherwise, if decl’s name is an ASCII case-insensitive match for "unicode-range", consume the value of a unicode-range descriptor from the segment of the original source text string corresponding to the tokens returned by the consume a list of component values call, and replace decl’s value with the result.

The issue lies in that there's two "otherwise" there (emphasis mine), both of which are conditional, meaning -- in plain language -- what if a declaration's name is not [an ASCII case-insensitive match] for "unicode-range"? What should a compliant parser do then? It's effectively a case of a missing "fallthrough" (default) behaviour specification, the way I see it. An omission of sorts?

Reading this with a different pair of (fresher) eyes, I understand the implication is that if neither of the clauses apply, the parser should "do nothing", but I suppose a remaining issue would be that there's actually several places in the spec. elsewhere which explicitly mention "do nothing", so lack of such explicit "do nothing" is somewhat of an inconsistency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant