- From: Adam Argyle via GitHub <sysbot+gh@w3.org>
- Date: Thu, 07 Jul 2022 05:08:28 +0000
- To: public-css-archive@w3.org
I think you did the right thing reverting the change that tried to correct it for developers. I'm thinking wait/lean on devtools to help developers learn that :`is()` and `:where()` can't accept pseudo elements? add it to a style linter to watch out for? or the postcss plugin could notice nested `::` and warn in the console?
agree that this is a tough lesson in nesting, since the 1st lesson to be learned with `is` and `where` feels out of no where. heh, `no:where()`..
i believe this is how the nested selectors can be rewritten.
```css
.anything {
&::before {}
@nest .something_else > &::before {
color: black
}
}
```
this makes me think we could add a warning to the spec that any nesting inside a `::before` (or of same type) will produce an invalid selector per https://www.w3.org/TR/selectors-4/#matches-pseudo and have no matches.
--
GitHub Notification of comment by argyleink
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7433#issuecomment-1177077310 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 7 July 2022 05:08:30 UTC