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

> Yup, that exact pattern is documented in 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.

Note that the problem I was trying to highlight is actually the reverse. If a new, non-custom property has a `{}` and then something _after_ the block, the part after the block won't get skipped if the property gets treated as an invalid rule. Theoretically, the end bit could wind up looking like a valid property on its own, and error recovery would wind up injecting a new property that it shouldn't. So this is a risk of using rule recovery where we should use declaration recovery... Having something before the block isn't the risk here, it's allowing things after the block. (Things before the block may pose another risk, like confusing the lookahead algo.)

-- 
GitHub Notification of comment by plinss
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8349#issuecomment-1407102081 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 21:41:15 UTC