- From: Rune Lillesveen via GitHub <sysbot+gh@w3.org>
- Date: Fri, 05 Apr 2024 13:56:22 +0000
- To: public-css-archive@w3.org
An author reason for not matching the host with `:not(foo)`:
Say I want to style `<img>` elements in the shadow tree that's not wrapped in some `.foo`:
```css
:not(.foo) img { ... }
```
If `:not(.foo)` matches the shadow host, that selector would always match all img elements.
I would instead have to write:
```css
:host :not(.foo) img { ... }
```
or add some other selector outside `:not()` that I knew matched the element on which I set .foo.
--
GitHub Notification of comment by lilles
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10179#issuecomment-2039875691 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 5 April 2024 13:56:23 UTC