formaat-design / reshaped

Community repository for storing examples, reporting issues and tracking roadmap
https://reshaped.so
97 stars 3 forks source link

Using the ShadowDOM #218

Open rauloaida opened 5 months ago

rauloaida commented 5 months ago

Describe the bug

To Reproduce CodeSandbox Example

Expected behavior

Environment (please complete the following information):

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

blvdmitry commented 5 months ago

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