Elektrine lite

← Feed

@zacky@m.marchbox.com

Post #2450550

2026-03-28 16:42 UTC

@westbrook@mastodon.social I’m AFK so can’t test but wondering if `:host-context()` could achieve the same?

Replies (1)

  • @westbrook@mastodon.social 2026-03-28 16:49

    @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 🤞

    Open ##2450551