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

@frostyweather Would the [scoped styles](https://drafts.csswg.org/css-cascade-6/#scoped-styles) proposal address your use case?

From my perspective (Salesforce/LWC), I don't see a strong need for open-stylable shadow roots. We've implemented [light DOM scoped styles](https://rfcs.lwc.dev/rfcs/lwc/0116-light-dom-scoped-styles) with an eye towards compatibility with the scoped styles proposal. For `<slot>`, we've implemented [light DOM slots](https://lwc.dev/guide/light_dom#slots) as a compile-time (not runtime) concern similar to how Svelte or Vue do it. So our users can use light DOM components and get either scoped or unscoped CSS, with styles bleeding in from above, as well as light DOM "slots."

Assuming a world with scoped styles, and given that open-stylable shadow roots don't solve the problem of "I want to traverse the whole DOM with `querySelector()`", and given that you can use superclasses/mixins/etc to apply the same constructable stylesheets to every component, the best argument for open-stylable shadow roots seems to be: "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.

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

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

Received on Saturday, 17 September 2022 02:24:04 UTC