在我的 Material UI 主题中,我为每个变体定义了样式:
const theme = createMuiTheme({
palette: {
primary: {
main: "#1dc0d7",
},
secondary: {
main: "#c9c9c9",
dark: "#505255",
},
},
typography: {
allVariants: {
color: "#505255",
},
body1: {
fontSize: '1em',
},
body2: {
lineHeight: 1.25,
},
subtitle2: {
fontWeight: 'bold',
},
h1: {
fontSize: '2.4em',
},
h6: {
fontSize: '1.25em',
},
},
});
但是,由于某些奇怪的原因,我的“h1”变体 CSS 规则被另一个规则覆盖,我不知道它来自哪里:
有任何想法吗?