Re: [csswg-drafts] [css-nesting] Another problem with mixing declarations and rules - error recovery (#8349)

> where we'll get into trouble is if we ever add something like:

Yup, that exact pattern is documented in [my lookahead parsing comment as a design restriction](https://github.com/w3c/csswg-drafts/issues/7961#issuecomment-1396136134) we'll have to abide by - non-custom properties will still be able to *start* with a {}-block (allowing ideas like explicit shorthands or whatever), but wouldn't be able to contain a top-level {}-block *after* the start.

> Falling into declaration error recovery by mistake could be really bad.

Agreed, thus my analysis in my previous comment. So long as CSS abides by the design restriction, one of the possible "parse like a declaration" results is safe, and the other two, while still "unsafe" (that is, they'll eat following rules at the same level, until they see a `;`), require typo'ing your stylesheet.

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


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

Received on Friday, 27 January 2023 20:13:13 UTC