- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Wed, 19 Mar 2025 16:31:28 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `[css-scoping-1] Dynamic changes of state and attributes referenced by :host-context rules are pretty hard to handle efficiently.`, and agreed to the following: * ``RESOLVED: Drop `:host-context()` `` <details><summary>The full IRC log of that discussion</summary> <emilio> TabAtkins: emilio brought up the issue that `:host-context` pseudo-class matches the host element inside a shadow root, and it matches the host if any of the ancestors match the compound<br> <emilio> ... intention was to solve some theming use cases (light/dark mode etc)<br> <emilio> ... issue is that this is not very efficient, tree-crossing, and invalidation is difficult<br> <emilio> ... since then, most of the use cases can be replaced by style queries (and better)<br> <emilio> ... e.g. instead of light / dark class, you can use it to set a custom prop and use inheritance<br> <emilio> ... shadow tree can use a style query<br> <emilio> ... it handles scoping / don't have to worry about which one is closer<br> <emilio> ... it pulls in the cost of the container query but avoids the cost of cross-tree invalidations<br> <emilio> ... emilio and WebKit impl would prefer to remove host-context<br> <emilio> ... afaict it's only chrome<br> <emilio> ... this could be a compat issue for chrome, so fairly limited<br> <emilio> ... so I'm ok with dropping this given the powers CSS has now<br> <emilio> ... unless there's objections I'd be happy with a resolution<br> <emilio> astearns: do you think you'll be successful convincing Blink to remove it?<br> <keithamus> q+<br> <emilio> TabAtkins: we shall see<br> <astearns> ack keithamus<br> <emilio> ... but at least it can be clear that it's chrome-only and not intended to be implemented everywhere<br> <emilio> keithamus: is there a use counter?<br> <emilio> TabAtkins: not sure but that'd be the first step in our deprecation process<br> <emilio> astearns: is there anything that host-context can be used for not covered by container-style queries?<br> <emilio> TabAtkins: the only difference is it switches who has control over<br> <emilio> ... that said you shouldn't be depending on details from the outer tree if the outer tree isn't expecting it<br> <emilio> ... shouldn't really matter where the control lives<br> <emilio> ... but if the same person controls both sides, there's no difference in abilities<br> <dbaron> use counter: https://chromestatus.com/metrics/feature/timeline/popularity/470<br> <emilio> TabAtkins: slowly trending upwards but given the numbers probably possible to remove via a deprecation process<br> <emilio> astearns: proposed resolution to drop `:host-context()`, objections?<br> <emilio> +1 :-)<br> <emilio> RESOLVED: Drop `:host-context()`<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1914#issuecomment-2737310093 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 19 March 2025 16:31:29 UTC