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

@DarkWiiPlayer 

> I think you're conflating two ideas here:

> In cases where the entire content generation of a site is handled by a single framework, then that framework could easily insert code at several points, meaning it could create a custom element and add corresponding CSS elsewhere to push styles into it.

> This much is correct. However, you're reducing the entire feature to this specific case. The point of web component is precisely to not depend on this type of architecture where a single framework controls the entire stack, but where component authors can independently write framework-agnostic components that any website can just use.

It doesn't need to control the entire stack. The `<style>` tag can be output inline right next to the shadow template:

```html
<style>@layer or @scope or whatever ...</style>
<my-element>
  <template shadowrootmode="open">...</template>
</my-element>
```

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

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

Received on Monday, 18 March 2024 20:23:58 UTC