Re: [WICG/webcomponents] "open-stylable" Shadow Roots (#909)

@nolanlawson 

> Assuming a world with scoped styles

Scoped styles don't reach into shadow roots w/o something like open-stylable anyway.

> and given that open-stylable shadow roots don't solve the problem of "I want to traverse the whole DOM with querySelector()",

No they don't, but this proposal isn't aimed at solving that. The vast majority of feedback I've encountered here is around styling. I think if we hear a lot more about problems with the other aspects of encapsulation, it might warrant ideas around decoupling shadow DOM features. I've heard some rumbling about shadow DOM's all-or-nothing encapsulation nature, but not usually specific.

> "I want to use runtime (not compile-time) <slot>s, I want styles to bleed in, and I also don't want to use superclasses/mixins/etc." This doesn't seem super compelling to me.

Runtime slots is a _huge_ deal - they are what enable interoperable composition. Having a container element to work with any content and not via a proprietary API is a large part of the value proposition of web components. From the apparent point-of-view of the framework users involved in these conversations, slots seem like _the_ compelling feature of shadow DOM which they would love if not for the other encapsulation (which seems mostly to be a problem with interfacing with current/legacy environment, which - in turn- are not so always transient and may persist for decades and are preventing web component adoption).

So I think for many people, even if not for Salesforce, slots + styles bleeding in _is_ very compelling.

I don't know what compiler-time slots are really or how we would express that in any kind of platform spec. Many libraries, and certainly plaing HTML, do not involve a compiler at all.

And let's keep in mind that I'm only proposing opt-in relaxing of the lower-bound for style scoping. The upper bound, which is still critical to keep component styles from leaking out, would still be there.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/909#issuecomment-1254301745
You are receiving this because you are subscribed to this thread.

Message ID: <WICG/webcomponents/issues/909/1254301745@github.com>

Received on Wednesday, 21 September 2022 22:34:14 UTC