Skip to content

[css-syntax][selectors] Clarify handling of invalid selectors in css-syntax. #85

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

Closed
Ms2ger opened this issue Dec 19, 2015 · 5 comments
Closed
Assignees
Labels
Closed Accepted by Editor Discretion Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-syntax-3 selectors-4 Current Work Testing Unnecessary Memory aid - issue doesn't require tests

Comments

@Ms2ger
Copy link

Ms2ger commented Dec 19, 2015

CC @tabatkins @SimonSapin

https://drafts.csswg.org/css-syntax/#css-stylesheets says

The prelude of the qualified rule is parsed as a selector list. If this results in an invalid selector list, the entire style rule is invalid.

The prelude of a qualified rule is a list of component values, and I can't find any prose that defines how to parse that into a selector.

(Pedantic, I know, but this is much less well-defined than the rest of the otherwise well-written spec.)

@SimonSapin
Copy link
Contributor

I think the proper way to fix this is to rewrite https://drafts.csswg.org/selectors/#grammar in terms of css-syntax.

Could railroad diagrams be normative?

@tabatkins
Copy link
Member

Yeah, there's no proper normative description yet in Syntax terms; I have a long-delayed task to rewrite the Selectors grammar accordingly.

Railroad diagrams probably could be normative, if you wanted. There's no error-correction, so they're fine. But it's also easy to just write some syntax for it.

@astearns astearns added the selectors-4 Current Work label May 18, 2016
@tabatkins tabatkins self-assigned this May 26, 2016
@fantasai fantasai changed the title Clarify handling of invalid selectors in css-syntax. [css-syntax][selectors] Clarify handling of invalid selectors in css-syntax. May 26, 2016
@tabatkins
Copy link
Member

Ah, I did get around to writing the Selectors grammar, so I can rephrase this to explicitly reference the correct productions.

@tabatkins
Copy link
Member

Fixed.

@Ms2ger
Copy link
Author

Ms2ger commented Jun 23, 2016

f02bb2e

frivoal pushed a commit to frivoal/csswg-drafts that referenced this issue Nov 15, 2018
…n-navigate

Polyfill use spat nav search in navigate
@tabatkins tabatkins added Closed Accepted by Editor Discretion Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. Testing Unnecessary Memory aid - issue doesn't require tests labels Jan 25, 2019
@tabatkins tabatkins added this to the CSS Syntax 3 June 2019 CR milestone Jun 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Accepted by Editor Discretion Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-syntax-3 selectors-4 Current Work Testing Unnecessary Memory aid - issue doesn't require tests
Projects
None yet
Development

No branches or pull requests

5 participants