Re: [w3c/webcomponents] Theming options for shadow roots (#864)

From my experience working on many projects in the past ~25 years it is a good thing if users of a component (not the author) can decide how they want to use it, even if it has not been intended by the author of the component.
That is what has made the web such a success: You could grab an existing component, use it in your project and then find some weird css rules or JS hacks to adjust it to your needs.
(In contrast I had to decompile many Java libs to fulfill projects requirements while the authors would say: This is not how it was intended to use. I understand the authors point of view , but this is just not how the world works from my experience)
To make web components a success it would be great if there would be a way for *all* components (not just the ones where the author decided to provide a way to theme the component) to override the styles in every detail.
I think this could be achieved by either let the user decide to let styles from the outside leak into the component, e.g.:
<my-component css="open">
or by providing a platform mechanism to inject a stylesheet to the component root of the component (and all nested subcomponents if any).

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

Received on Wednesday, 26 February 2020 10:18:31 UTC