- From: dan sinclair via GitHub <sysbot+gh@w3.org>
- Date: Wed, 26 Jan 2022 19:24:54 +0000
- To: public-css-archive@w3.org
dj2 has just created a new issue for https://github.com/w3c/csswg-drafts:
== [css-nesting]: Confusion around __ example. ==
In https://www.w3.org/TR/css-nesting-1/ in [section 2.1 Direct Nesting](https://www.w3.org/TR/css-nesting-1/#direct) the following example is given:
```scss
.foo {
color: blue;
&__bar { color: red; }
}
/* In CSS, this is instead equivalent to
.foo { color: blue; }
__bar.foo { color: red; }
*/
```
The output of `__bar.foo` doesn't seem to match up with other examples. In other examples the parent selector appears in the same position as the `&` symbol. Is it correct that the `.foo` appears on the left of `__bar` and, if so, are there other cases where the selector flips sides?
Would this also mean that:
```scss
.foo {
&h1 {color: red; }
}
```
becomes `h1.foo {color:red;}` ?
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6993 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 26 January 2022 19:24:55 UTC