Re: [csswg-drafts] [css-nesting] Syntax suggestion (#4748)

> _@LeaVerou wrote:_
> 
> > I think I prefer my second idea from that comment:
> 
> Doesn't that idea involve wrapping it all in brackets again, and thus bring us back to the double-indentation issue? That's why I liked the string-based delineators of `@nested;` (or `@nestStart ... @nestEnd`)—there's no implicit indentation needed.

Nope, not at all. Zero extra indentation.

I'll explain with some examples.

This is fine:

```css
.bar {
 &.baz {}
 & foo {}
 :root.quux & {}
}
```

This is fine:

```css
.bar {
 & foo {}
 :root.quux & {}
 &.baz {}
}
```

This is NOT ok (first nested rule does not start with `&` and is thus ignored:

```css
.bar {
 :root.quux & {}
 & foo {}
 &.baz {}
}
```

This is fine:
```css
.bar {
 &{}
 :root.quux & {}
 & foo {}
 &.baz {}
}
```

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


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

Received on Thursday, 11 November 2021 15:57:25 UTC