Re: [csswg-drafts] [css-syntax] Review requested of new Parsing text (#8834)

I'm not sure how to clarify it further than what's already there. The current parsing context (some declaration or rule, possible with parent rules, etc) determines whether any given thing is valid, according to specific grammars and/or prose in the relevant specs.

The function in my CSS parser library is just a generic, relatively dumb version of this that will *usually* correctly tell apart a rule from a declaration, without knowing anything about what is actually allowed. You just need *something* that can spot that `a:hover { color: blue; }` is not a valid declaration, so it can get parsed properly as a rule.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8834#issuecomment-1675464500 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 11 August 2023 22:19:37 UTC