When working with React-Admin, I encountered a challenge in applying specific CSS code globally within my Material UI theme. As I set up my theme, I included the following lines in the overrides section:
overrides: {
"@global": {
"[class*='RaLayout-content']": {
overflow: "auto !important",
maxWidth: "100vw !important",
},
},
Throughout the admin interface, there are multiple classes such as: RaLayout-content-4
, RaLayout-content-221
, RaLayout-content-31
. These classes are generated by React-Admin, and I aim to apply the aforementioned CSS rules to every element containing the RaLayout-content
class.
Due to class name minimization during Heroku deployment, I cannot include these CSS lines in my index.css file as they may not be effective post-minimization.
Prior to this, I had successfully implemented similar styles in my index.css file, albeit only functioning in development mode:
[class*="RaLayout-content"] {
overflow: auto !important;
max-width: 100vw !important;
}
I have also attempted to incorporate the MuiCssBaseLine without achieving the desired results.
Thank you for your assistance!