-
-
Notifications
You must be signed in to change notification settings - Fork 299
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
Styles not applied when rendering in custom element with shadow dom #576
Comments
Hi, coincidentally, I am currently dealing with the same problem as you. I have modified your sandbox code to manually inject the styles under the shadow root using goober's https://codesandbox.io/p/sandbox/nifty-gwen-rtrrd5?file=%2Fsrc%2Fmain.tsx%3A7%2C29 |
thanks for your input, i was trying to do In they docs they mention that we can use target to pass container root where style tag will be rendered |
Hi everybody, i just stumbled upon this problem because im using notistack inside a shadowDom within an React application.
I ended up kindof doing the same but without the
It's not pretty but for now it seems to work. |
When using custom element, with shadow dom attached, to render react application - styles are not being applied and there is no posibility to tell notistack to render styles in different element.
Expected Behavior
I expect to be able to control where the style tag is rendered, in my case i want it to be rendered in the shadow dom of my custom element
Current Behavior
I cannot control where the style tag is being rendered and it is rendered always in the "head" of document.
Steps to Reproduce
Link: https://codesandbox.io/p/sandbox/mutable-thunder-t5h5r6?file=/src/main.tsx:17,11
Context
We have application that is being served to clients as custom element that is being embedded on they websites. Not to interfier with client styles we are using shadow dom / mode to isolate styles so that their styles do not affect our widget and our styles do not affect they website.
We encountered a problem when updated to v3.0.1 that we cannot configure anyhow "notistack" to "emit styles in our custom element shadow dom".
We have emotion cache provider set up properly to emit styles in our shadow dom wich was applied to v2.0.8 of notistack i guess..
Your Environment
The text was updated successfully, but these errors were encountered: