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

Ok, another idea: Instead of prepending an instruction that changes parsing, what if the rule is "Always prepend with `@nest`, but you can mass-prepend by using `@nest { ... }`"?

I.e. the following would be equivalent:

```css
a.foo {
 @nest &:hover {}
 @nest .bar &:hover {}
}
```

```css
a.foo {
 @nest {
  &:hover {}
  .bar &:hover {}
 }
}
```


Then it's not two syntaxes, but a shorthand form of the same syntax, and authors have the option of whether to introduce a second level of nesting or not in their code.

(I'm just brainstorming here, not sure *I* support the idea)

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


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

Received on Monday, 4 October 2021 18:31:52 UTC