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

> :host-context() and :host(:has()) do not have the same shadow piecing performance profile, so while one can lament the loss of :host-context() there's no specific need to associate it directly to :host(:has()).

I'm not sure what you mean by this. They're doing nearly exactly the same thing - matching based on the light tree outside of the shadow, relative to the host somehow. If anything, `:host(:has(...))` is worse than `:host-context()` because it `:has()` is generally expensive while `:host-context()` is limited to a single compound selector in the ancestor tree, basically just running `arg#host, arg #host` in the light tree, instead of `#host:has(arg)`.

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


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

Received on Wednesday, 12 March 2025 21:37:33 UTC