Re: [csswg-drafts] [css-nesting-1] Can we relax the syntax further? (#7961)

@andruud Yay, this is fantastic news!! 🎉 Thank you for sharing this update.

> * First, try to parse as a declaration. If that succeeded (i.e. resulted in a declaration), then it _was_ a declaration, otherwise:
> * Rewind and try again as a nested rule. If that succeeded (i.e. resulted in a style rule), then it _was_ a style rule, otherwise:
> * It doesn’t parse as anything, and we don’t explain what it “is”. (Error recovery works like today, by eating everything until the next semicolon).

This sounds correct and I like the simplicity, though it's less optimized than both [the algorithm I outlined in the first post](https://github.com/w3c/csswg-drafts/issues/7961), and [the algorithm that @tabatkins outlined here](https://github.com/w3c/csswg-drafts/issues/7961#issuecomment-1396112293). Do you still parse as a declaration even when the first token is _not_ an ident or function token?

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


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

Received on Thursday, 30 March 2023 13:32:01 UTC