Re: [csswg-drafts] [css-nesting-1] Syntax Invites Errors (#7834)

No current *browser* parser/tokenizers naively scan for the next `}`. If existing non-browser tools do, they're violating the Syntax spec. Correctly handling nesting of `()`, `[]`, and `{}` has been part of CSS since at least the CSS2 grammar, and it's extremely explicit in the Syntax spec.

So this is all completely well-defined in CSS. The only parsing detail relevant here is that nested rules will use my described ["consume an ambiguous rule"](https://github.com/w3c/csswg-drafts/issues/7834#issuecomment-1270665794) algorithm, which will end them immediately (and throw the result away as invalid) if they see a semicolon in the selector part.

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


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

Received on Wednesday, 19 October 2022 21:50:21 UTC