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

Fwiw, if we go with option 4 and want to use something other than bare parentheses, I would not want to us `&` since it already has a meaning as a selector. We could use `&&` or something else, but not `&` by itself. So, to use @flackr's example, it would look like:

```
.a {
  property: value;
  property: value;
} && {
  .b {
    property: value
    property: value;
  } && {
    .c1 {
      property: value;
      property: value;
    }
    .c2 {
      property: value;
    }
  }
}
```

Bare parens are cleaner, but one advantage of using an indicator rather than bare parens is being able to drop empty declaration blocks, so instead of

```
.a {} {
  .b { ... }
}
/* or */
.a {
} {
  .b { ... }
}
```

you can write

```
.a && {
  .b { ... }
}
```
which maybe looks less weird, idk. (Nested rules without declaration blocks on the parent selector are reasonably common.)

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


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

Received on Wednesday, 26 October 2022 13:35:34 UTC