Re: [csswg-drafts] [css-nesting] How to resolve nested CSS with pseudo elements in the parent (#7433)

> Conceptually, there is no reason to disallow this:
> ```css
> .anything::before { .something_else > & { color: black  }}
> ```

@LeaVerou I disagree: the reason is that `::before` pseudo-elements cannot be children (in the DOM).

`::` is like a combinator, so these are different:
```css
.something_else > .anything::before { color: black  }
.anything::before { .something_else > & { color: black  }}
```
Just like these are different:
```css
.something_else > .anything > before { color: black  }
.anything > before { .something_else > & { color: black  }}
```


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


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

Received on Friday, 21 October 2022 18:16:01 UTC