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
[material-ui][Typography] Migrating from v4 to v5 issue #41954
Comments
i have an update export const ThemeProvider = ({ children }: ThemeProviderProps) => (
<StylesProvider generateClassName={generateClassName}>
<ProviderTheme theme={theme}>
<CssBaseline />
<StyledEngineProvider injectFirst>{children}</StyledEngineProvider>
</ProviderTheme>
</StylesProvider>
); i removed the StyledEngineProvider, i had this before because there was some margins that were getting overwritten, removing this, would use my custom theme, but will put these component scoped styles above it, and at the they get overwritten, so my problem its some kind of order change from v4 to v5, i did follow the entire migration documentation, but i ran out of ideas on how to fix this |
I think the problem is, since im migrating to v5, im still using v4 for some part as im still upgrading, we have 2000 componetns to update, so is there a way to disable the styling from v4 while i upgrade? so app dont broke |
Steps to reproduce
This is my theme
when using the useTheme hook, i can see my custom theme, but when using native mui component, if i inspect them with dev tools, i can see my custom props below been overwritten by default one .css-MuiTypography- root is been overwritten by .MuiTypography-subtitle1
im using the subtitle1 variant
i tried this approach
but no luck, i can see the color red in the font, but not the size or other properties that are been overwritten, also i have my mode set to dark, but my font is still black, they should be white, so somehow, the custom theme is not been applied correctly
my imports
Current behavior
No response
Expected behavior
No response
Context
Im trying to update from mui v4 to mui v5, but my custom theme its been overwrite by the default one, in chrome dev tools, i can see my custom theme props, but they been overwritten by the default one
Your environment
npx @mui/envinfo
Search keywords: typography
The text was updated successfully, but these errors were encountered: