[Typography] margin
property is attached to root style by default
#30360
Labels
component: Typography
The React component.
support: question
Community support but can be turned into an improvement
v5.x migration
Duplicates
Latest version
Current behavior 馃槸
The problem is that in latest V5 Typography there is by default { margin : 0 } being extended in classes and therefore the margin is getting attached to the root styles which is then being override only by applying !important to the margin from the classes.
During the initial createTheme I am not able to remove the margin or set it to null so that it doesn't get attached to the default root styles .
Expected behavior 馃
Need to confiigure such that from the properties exposed through createTheme ( e.g. styleOverrides ) that margin property doesn't get attached to root styles and only properties that I specify remains intact to it
Steps to reproduce 馃暪
Steps:
Context 馃敠
setting margin property through classes to the typography component doesn't override it until important is appended to margin value since attachment of margin : 0 a root by default need to overwrite margin from classes without specifying important
Your environment 馃寧
`npx @mui/envinfo`
The text was updated successfully, but these errors were encountered: