- From: robglidden <notifications@github.com>
- Date: Thu, 21 Mar 2024 12:11:25 -0700
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 21 March 2024 19:11:29 UTC
> I am not entirely sure why shadow crossing combinators have such a mindshare in this issue and keep coming up. > > > The answer is simple: framework components f.e. in React, Preact, Svelte, Vue, Solid, Angular, etc, all have this feature out of the box. We need to make the migration story from framework components to custom elements easy for all web developers. Cross-root selectors like .foo .bar are essentially required for this. > There is also the [`:host-context()`](https://drafts.csswg.org/css-scoping/#host-selector) pseudo-class function which tests whether there is an ancestor, outside the shadow tree, which matches a particular selector. But it is [not supported](https://caniuse.com/mdn-css_selectors_host-context) in either Safari or Firefox. And unlikely to ever be? In [2016](https://bugs.webkit.org/show_bug.cgi?id=160038), Apple stated its opposition to :host-context() as an anti-pattern that sets behavior of elements based on context, and [subsequent discussion](https://github.com/w3c/csswg-drafts/issues/1914) tends towards favoring dropping it from the specification. -- Reply to this email directly or view it on GitHub: https://github.com/WICG/webcomponents/issues/909#issuecomment-2013381191 You are receiving this because you are subscribed to this thread. Message ID: <WICG/webcomponents/issues/909/2013381191@github.com>
Received on Thursday, 21 March 2024 19:11:29 UTC