The documentation for Material UI Typography settings (https://mui.com/material-ui/customization/typography/) are confusing and don't really make sense:
MUI uses rem units for the font size. The browser element default font size is 16px, but browsers have an option to change this value, so rem units allow us to accommodate the user's settings, resulting in a better accessibility support. Users change font size settings for all kinds of reasons, from poor eyesight to choosing optimum settings for devices that can be vastly different in size and viewing distance.
To change the font-size of MUI you can provide a fontSize property. The default value is 14px.
So which is it? It uses REM or use the font-size as a base for the typography variants? If you look at the default theme (https://mui.com/material-ui/customization/default-theme/?expand-path=$.typography) all the variants are supposed to use rem
-- and the documents even talk about customizing this value in htmlFontSize
.
So I'm really struggling to understand the use/purpose for the fontSize
theme setting?
rem
. REM is derived from thehtmlFontSize
value (in turn which is set onhtml
element (if you so want to mess with that setting beyond the browser default.) -- I already know this. unfortunately it doesn't help answer what the point of thefontSize
property is in the typography part of the theme. – Moser