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

Just because this will be burried in the call otherwise, I also came up with another variation of `1` that might solve its weirdest syntactic edge-case is: getting rid of `@nest` and allow `&` to appear in the selector twice (one at the start, and optionally one inside which is the actual place the replacement occurs in the rare cases where you need that). Every selector always start with `&` that way, this is consistent and easy to teach. I guess this would cont as `1b` in the proposal nomenclature. 

I would be fine with that as well, especially if we combine this with a compatibility change to `@scope` to allow `&` as a `:scope` shortcut. That way, we have a consistent syntax, and solves the `nested>@scope` upgrade path.

I would still rather we had `4` which requires no parser update and allows for bi-direction `nested`-to-`@scope` compatibility (in fact, you can just take any part of css and nest it, no change needed), but there are other trade-offs of course, which I care less about but might be of interest to others I reckon.

-- 
GitHub Notification of comment by FremyCompany
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7834#issuecomment-1284325507 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 17:10:25 UTC