-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[docs] Adding prepend: true
to emotion cache breaks remix example
#30359
Comments
prepend: true
to emotion cache breaks remix example
@mnajdova I'm not sure why I can't see your reply here... so I guess I'll just look like I'm talking to myself 😅 . Sorry for not being very clear, I was trying to make my global/shared styles take precedence over mui's because mui's styles would override them. global css file being overridden by mui document head element style tag order Um, but I actually managed to get the Thanks very much for your time, apologies for the muck about. |
@ShuPink I got the same Issue and was not able to get |
@yannickpschroeder hmm that link was probably not the best work on my part. I didn't submit a PR as I'm not so sure about the way forward with this issue, since I don't really know how to resolve it properly. I can only get rid of the error by:
I also tried moving the I also tried it in a sandbox, without removing the styles from I don't know if any of that will help but hopefully it can give you some clues. |
Sorry for coming a bit late, but it was misleading as the issue was closed. Was this resolved? Can you still see the problem? |
I originally resolved this issue by removing the global styles, but the remix example was also being updated to remove a double rendering issue which I thought also resolved this error. After this PR when I tried to resolve the issue for yannickpschroeder, I couldn't resolve the hydration error that came with css: prepend` consistently (it worked on stackblitz but failed in my local environment). Not sure if this issue will be resolved with this PR? or.. is that why this issue has been reopened 😕 |
Duplicates
Latest version
Current behavior 😯
Adding
prepend: true
to the emotion cache used in the remix-with-typescript example to modify the injection order of mui styles and global css styles causes DOMExceptions.Removing
CssBaseline
fromentry.client.tsx
will remove the DOMException, but the hydration warning remains.Moving the style tag generator in
root.tsx
also does not help to remove the hydration warning.Expected behavior 🤔
Expected the mui styles to move from the bottom of the
head
element to the top of thehead
element, and the DOM to render without exceptions.Steps to reproduce 🕹
Steps:
Context 🔦
Trying to reduce the precedence of mui when interoperating with other style methods (e.g. using global styles)
Your environment 🌎
`npx @mui/envinfo`
The text was updated successfully, but these errors were encountered: