Re: [csswg-drafts] [css-nesting-1] Yet another nesting proposal (#7970)

> the syntax for properties has way too many collisions with selectors, so a carve-out for allowing selectors gets cumbersome.

Note: it has *one* collision with selectors. The carve-out to avoid the ambiguity is rather simple, as Option 3 has shown.

> No, [& is not allowed] on a nested rule. 

It must be allowed, to hit a number of important use-cases, namely the `&:hover` and `.parent &` ones. Making it purely a suffix to the parent with a combinator between them is too limited.

----

But yeah, generally I agree with Oriol. This is a relatively invasive change to add nesting to an existing style rule. It continues to require non-local edits in deeper nesting, too, going from:

```css
@nest foo {
  bar {color: red;}
}
```

to 

```css
@nest foo {
 @nest bar {
   & { color: red; }
   baz { color: green; }
  }
}
```

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


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

Received on Thursday, 27 October 2022 21:15:56 UTC