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

Using the ShadowDOM #218

Open
rauloaida opened this issue Feb 6, 2024 · 1 comment
Open

Using the ShadowDOM #218

rauloaida opened this issue Feb 6, 2024 · 1 comment

Comments

@rauloaida
Copy link

Describe the bug

  • No documentation/example I could find on the correct way to implement the shadowDOM using Reshaped.
  • Reshaped styles are not applying in the example attached.

To Reproduce
CodeSandbox Example

Expected behavior

  • Reshaped theme and functionality can be used normally within a shadowDOM element.

Environment (please complete the following information):

  • Reshaped 2.9.3
  • Chrome v117.0.5938.92

Additional context
Shadowdom elements are awesome :) would love to have this functionality with Reshaped and replace all our iframes!

@blvdmitry
Copy link
Contributor

That's an interesting use case for sure and I guess what ShadowDOM does right now is actually what one would expect from both ShadowDOM and iframe since both make sure your styles inside and outside the container are isolated. Therefore there is a big dependency on the way styles are loaded on the page. If you're able to load the link/style tags inside your shadow DOM – they should apply to the components as expected. I'll try to find more examples of how others are using ShadowDOM in next js with their default build tooling

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