-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
nextjs head order on revalidated pages #20
Comments
Thank you very much for the efforts you are putting into git clone https://github.com/garronej/tss-react && cd tss-react
yarn
yarn build
yarn start_muiV4 |
Sure, thank you for actually making this! I'm happy to help, let me know if I can support in some way. |
On material ui v4, there was a critical bug when used with nexjs and revalidated pages:
mui/material-ui#25307
It would lead to page layouts breaking in random ways due to orders of tags in head changing.
Fixing it was out of scope for MUI v4, and as @oliviertassinari pointed out there, the same issue was unlikely to appear in emotion since that uses prop cascading.
I'm wondering now if these issues are likely to come back when using tss-react:
What I was currently trying to solve with some of the the other issues I opened, is basically the makeStyles-defined classes having more priority than the MUI ones, although following the emotion cascading logic, it would be the opposite (Outside some component using the tss version of makeStyles first, then inside/after the MUI component defining its own styles)
So far, making the makeStyles-classes have more priority only worked by using two emotion caches, and essentialy relying on the order of elements in HEAD if I get things correctly
I will prepare a sandbox like the one in the issue above to see if I can observe the same behavior.
The text was updated successfully, but these errors were encountered: