- From: Byungwoo Lee via GitHub <sysbot+gh@w3.org>
- Date: Tue, 12 Apr 2022 16:56:24 +0000
- To: public-css-archive@w3.org
byung-woo has just created a new issue for https://github.com/w3c/csswg-drafts: == Consider disallowing :host, :host(), :host-context() inside :has() == The only meaningful usage of `:host` inside `:has()` is using it with `:scope`. * `.b:has(:host .a :scope .c) { color: green }` In the above example, the `:scope` inside the `:has()` matches the subject element of the style rule according to the [current relative selector absolutizing spec](https://www.w3.org/TR/selectors-4/#absolutizing) But as pointed in some other issues ([issue 6399](https://github.com/w3c/csswg-drafts/issues/6399), [issue 7211](https://github.com/w3c/csswg-drafts/issues/7211)), the above expression has the same problem in the below expression. (increasing invalidation complexity) * `.b:has(:is(:host .a :scope) .c) { color: green }` So, it would be better to use below expression instead of the above. * `:host .a .b:has(.c) { color: green }` How about disallowing `:host`, `:host()`, `:host-context()` inside `:has()` to avoid increasing complexity? Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7212 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 12 April 2022 16:56:25 UTC