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:
> 
> ```
> <style>@layer or @scope or whatever ...</style>
> <my-element>
>   <template shadowrootmode="open">...</template>
> </my-element>
> ```

...and how would that help, exactly? That way you could define new styles to push inside your custom element, gaining nothing over just putting the styles *inside* the actual shadow DOM.

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

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

Received on Monday, 18 March 2024 20:59:53 UTC