Elektrine lite

← Feed

@westbrook@mastodon.social

Post #2450551

2026-03-28 16:49 UTC

@zacky@m.marchbox.com A great question, and certainly a reason to hope that Chrome wouldn't have much issue getting into this style of selector! However, these's no _self_ selector in `:host-context()`. Always it's interpreted as: ```css :host { .host-context & { /* You're in a host context. */ } } ``` It being deprecated, maybe the same intrepid implementor who was going to pull this out of Chromium would be interested in replacing it with extended `:host:has(...)` and `:host(:has(...))` support 🤞

Replies (1)

  • @zacky@m.marchbox.com 2026-03-28 16:57

    @westbrook@mastodon.social Yeah I remember :host:has() was somewhat on track but some people didn’t like the idea of :host(:has()) for the fact that some arbitrary light DOM structure could affect shadow DOM styles. But it would be so useful!

    Open ##2450552