emotion-js / emotion

👩‍🎤 CSS-in-JS library designed for high performance style composition
https://emotion.sh/
MIT License
17.51k stars 1.11k forks source link

Add example of using Emotion with shadow DOM #2663

Open srmagura opened 2 years ago

srmagura commented 2 years ago

Someone in Slack asked about shadow DOM so I created a working example of it here. The key is to make the cache insert <style> tags into the shadow DOM instead of the document's <head>.

Is this a common enough thing that's it worth adding to our documentation?

srmagura commented 2 years ago

@Andarist Do you think having such an example would be useful?

Andarist commented 2 years ago

Yeah, I think this could be a good addition to the docs. Emotion is surprisingly popular among shadow DOM users.

jdebr commented 1 year ago

I just wanted to voice my support for this and thank you for the example code!