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 to use Linaria with custom elements and ShadowDOM / ShadowRoots? #496

Open
trusktr opened this issue Oct 21, 2019 · 2 comments
Open
Labels
needs: investigation 🔎 Issue has to be investigated for reason or solution question ❔ Question related to the library

Comments

@trusktr
Copy link

trusktr commented Oct 21, 2019

First let me say, this is a nice project!

I'd like to make custom elements, and to give their content styling inside ShadowRoots.

I could possibly @import the URL of the output CSS file in every root's <style>, but then this would load all styles of every element in each shadow root.

Another thing is, how can we code the custom elements in a way that they do not know what the output URL is?

What about custom elements that will be published as a package for anyone to use? How would the custom elements know the URL to @import inside their <style> tags?

Any recommendation on how to handle ShadowDOM with Linaria?

@trusktr trusktr added the question Further information is requested label Oct 21, 2019
@jayu jayu added needs: investigation 🔎 Issue has to be investigated for reason or solution question ❔ Question related to the library and removed question Further information is requested labels Apr 1, 2020
@ghost
Copy link

ghost commented Jul 28, 2022

same question. Any updates?

@khanakia
Copy link

Yes, I would like to know as well. You can use custom elements using a stylesheet in styled-components.

Not sure what to do with linaria?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: investigation 🔎 Issue has to be investigated for reason or solution question ❔ Question related to the library
Projects
None yet
Development

No branches or pull requests

3 participants