Re: [csswg-drafts] [selectors][css-scoping] Should :host:(has()) match? (#11859)

`:host():has()` and `:host(:has())` have different performance characteristics. `:host:has()` is identical to `div:has()`; the only question was whether `:has()` was *allowed* to match `:host` due to it being featureless.

`:host(:has())`, on the other hand, requires you to match on arbitrary elements outside the shadow tree. I know @emilio preferred keeping it disallowed for this reason. Similarly, altho Safari supports `:host(:has())`, they are asking to remove `:host-context()` (in <https://github.com/w3c/csswg-drafts/issues/1914>), so I presume the same arguments apply and they'd prefer dropping their `:host(:has())` support as well. (@nt1m?) (The two are pretty much the same thing, just matching in different directions on the outer tree.)

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


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

Received on Thursday, 6 March 2025 21:58:18 UTC