Re: [csswg-drafts] [selectors-4] Consider disallowing logical combination pseudo-classes inside :has() (#6952)

I disagree with "generally not very useful":
 - `:has()` + `:not()`: something like `:has(#foo:not(.bar))` seems very useful to me.
 - `:has()` + `:is()`: useful for complex selectors, e.g. `.foo:has(.bar .baz)` requires `.bar` to be a descendant of `.foo`, but `.foo:has(:is(.bar .baz))` doesn't. Sure, I could rewrite it as 
   ```css
   .foo:has(.bar .baz), .foo.bar:has(.baz), .bar .foo:has(.baz)
   ```
   but in more complex cases the combinatorial explosion of cases can be cumbersome.
 - `:has()` + `:is()`: same

`:has()` + `:has()` could have its uses but yeah, generally it seems less useful.

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


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

Received on Friday, 14 January 2022 17:26:07 UTC