-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
CSS not properly applied in production, RA 3.1.3, Material UI 4.9.0 #4370
Comments
Hello, thank you for reporting an issue in react-admin. Reading your example, it seems that you only use material-ui components. So you can report the issue directly in the material-ui repository. You can also read the material-ui documentation which will explain to you how to override classes material-ui.com/api/tabs/css. Regards, |
I used the same code in a pure React / Material UI application, and did not have any issues. Is is possible something in react-admin is causing the issue? |
I also noted that some of react-admin's styles are not applied in the right order. I tried opening a bug with material-ui, but then closed it as "support" request. In DEV, I see "Layout" style next the the last one, while in PROD, it is move way up (also renamed to "makeStyles): |
It could be related to the material-ui version you use. Be sure to use the same version than the one used in react-admin. You can also check the following issue which describes a similar problem with styles: #1782 |
Production styles are applied differently from dev. I use the same MUI version as the one installed by react-admin component.
DEV
![image](https://user-images.githubusercontent.com/48455289/73399245-84eaa600-42ac-11ea-8508-c302c3f11b16.png)
PROD
![image](https://user-images.githubusercontent.com/48455289/73399278-8fa53b00-42ac-11ea-99d1-cf96d23904c2.png)
It appears that custom styles are applied before Material UI styles
Steps to reproduce:
See attached file full source code. /Home.js references custom {Tabs, Tab} components from /components/tabs. Custom Tabs and Tab components use Material UI Tabs/Tab components, which were renamed in code to MuiTabs and MuiTab.
app_src.zip
The text was updated successfully, but these errors were encountered: