tss makestyles getting overridden by mui styles
asimyaramis opened this issue · comments
Hi There,
I am trying migrate a big project mui v4 to v5 we had lots of makestyles in our codebase that is why i choose tss-react. But after that I realized that my styles getting overriden by mui and for my case it is not possible to increase the css specifity where the visual bugs happen bc project is wide. I looked it up there are several issues on this repo and mui repo but there is no specific solution.
Dependencies :
"@mui/codemod": "^5.11.12",
"@mui/icons-material": "^5.11.11",
"@mui/lab": "^5.0.0-alpha.122",
"@mui/material": "^5.11.12",
"@mui/styles": "^5.11.12",
"@mui/x-data-grid-premium": "^5.17.8",
"@mui/x-date-pickers": "^5.0.0",
"@mui/x-date-pickers-pro": "^5.0.0",
"tss-react": "^4.7.2",
and I don't want this media queries also
Thanks in advance
Hi,
You'll have to be way more specific.
Maybe produce a reproduction repo where you show what you expect vs what you get.
My guess is you're still using clsx instead of cx.
Hi @garronej ,Unfortunately I can not provide a demo repo. But I added two screenshot before one is the expected behaviour second one is the tss one. I removed all material libraries also. Somehow media query take precedence on tss it seems like. I am not using clsx. When migrating I used codemod jss-to-tss-react.
before
after
Hi @asimyaramis,
I can see much with what you are showing me, your before after isn't even the same node, and there is no .tss-xxx
class involved, I can't help you with so litle infos.