Re: [csswg-drafts] [selectors] Should :not(foo) match the host of the shadow tree? (#10179)

Consider `:not(:not(:host))`. I think it would be very unexpected for `:not(:host)` to match the host. Thus for both `:not(:not(:host))` and `:not(.foo)` the argument is something that doesn't match the host, so the behavior should be consistent.

Logically it can be a bit strange if `:host` matches but `:not(:not(:host))` doesn't?

I think the possibilities are:
 1. `:not()` matches the host if none of its arguments matches the host.
 2. `:not()` never matches the host.

| Selector | Option 1 | Option 2 |
| - | - | - |
| `:not(:host)` | ❌ | ❌ |
| `:not(:not(:host))` | ✅ | ❌ |
| `:not(.foo)` | ✅ | ❌ |
| `:not(:host, .foo)` | ❌ | ❌ |
| `:not(:host.foo)` | ✅ | ❌ |
| `:not(:not(:host), .foo)` | ✅ | ❌ |
| `:not(:not(:host)):not(.foo)` | ✅ | ❌ |
| `:host:not(.foo)` | ✅ | ❌ |

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


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

Received on Tuesday, 9 April 2024 12:04:30 UTC