Re: [csswg-drafts] [css-nesting-1] Behavior of nesting within pseudo element selectors (#7912)

I understand the simple cases are desirable; the question is what happens when you get to more complex things? We need to define something that either makes sense for everything, or is very clear about what specific cases work. E.g.

```css
div::before {
  &::after {
    content: "test"
  }
}
```

or

```css
div::part(x) {
    &.foo {
       color: red;
    }
}
```

There are lots and lots of these; Blink alone supports 124 different pseudo-selectors now (of which about 40 are pseudo-elements), and I guess there are still relevant ones defined that we don't support. They can be combined in a myriad of different ways. Can we find something that is reasonable for all of them? If we special-case a few, will we remember to go back and revise the nesting spec when new ones are added?

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


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

Received on Wednesday, 19 October 2022 21:00:23 UTC