Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can global css be applied to shadow dom elements? #11

Open
alexvbush opened this issue Dec 6, 2021 · 1 comment
Open

How can global css be applied to shadow dom elements? #11

alexvbush opened this issue Dec 6, 2021 · 1 comment

Comments

@alexvbush
Copy link

Thank you for putting such a great TLDR! I've been scouring the web but I can't find any good explanations on how to share css styles between larger DOM or from parent shadow dom element to child. i.e. how can I use say tailwind or material css library and use it in all of my shadow dom elements without any performance hits or "flickering"?

Thank you for your reply in advance!

@praveenpuglia
Copy link
Owner

praveenpuglia commented Dec 13, 2021

Do you mean applying, let's say classes, to shadow dom elements in order to get the same styles? or something like that? For that, the component author need to provide you with a way to pass on the classes.

In general, if they keep the components as simple as possible, you should just be able to apply your classes / styles to your custom element and those will be received by the root element.

Also can you show a demo where you experimented with some ideas and hit perf issues?

P.S - It's been a really long time I worked on any of the WC stuff so I might sound totally drunk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants