I’ve been working on creating a Typography element and noticed some default MUI CSS classes added when debugging in the browser. I attempted to disable them by using empty arrays at the end of the sx prop, but it did not work as expected.
In the image provided, you can see that I am trying to deactivate those 2 classes or at least have my properties respected. However, the default styles seem to override mine, especially when it comes to margins.
https://i.stack.imgur.com/W8L8r.png
<Typography
variant="h1"
sx={{
width: '100px',
height: '55px',
fontSize: '20px',
fontWeight: 500,
lineHeight: '1.2',
WebkitLineClamp: 4,
WebkitBoxOrient: 'vertical',
marginTop: '11px',
'& .MuiTypography-h1': {},
'& .MuiTypography-root': {},
}}
>
Title
</Typography>