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

> Syntax is same as Sass/etc-style, which many authors are used to. (And is arguably just a good design.)

Can we be specific about the Sass comparisons?
This proposal would only make it more similar to Sass styles nesting in one very specific aspect `.foo { .bar {} }`.

It will not allow BEM style selector concatenation and it will not match the same elements when complex selectors are involved and `&` is not part of the first compound selector.

--------

2.x : Can we list "requires a parser switch mechanic" as a Con?

--------

2.3 and 3 :

> Prevents us from ever changing property syntax to start with an ascii glyph. (Like `+transform:...;` for additive properties?) (But these are probably already ruled out anyway, due to people using garbage to "comment out" their properties, like `//color: red;`, or `*color:red;` for an old IE hack.)

It also limits future combinators and selector syntax because the ambiguity goes both ways.

Some examples :

```css
.foo {
  color: green;

  * {
    color: purple;
  }
}

.foo {
  color: green;

  ||td {
    color: purple;
  }
}
```


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


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

Received on Tuesday, 11 October 2022 21:13:38 UTC