可能是重复的,但是在必须将类应用于它们之前,我陷入了使用Material UI主题为a
标签等元素设置默认样式的方式上的困惑。
我尝试了各种解决方案,包括尝试在@globals
属性中进行设置,例如:
const theme = createMuiTheme({
palette: {
primary: {
main: '#000000'
},
background: {
default: grey[50],
},
},
typography: {
fontFamily: [
'"Open Sans"',
'sans-serif',
'"Helvetica Neue"',
'-apple-system'
].join(',')
},
overrides: {
MuiAppBar: {
colorPrimary: {
backgroundColor: grey[50]
},
colorSecondary: {
main: '#000000'
},
root: {
borderBottom: `1px solid ${grey[300]}`
}
}
},
'@global': {
a: {
textDecoration: 'none'
}
}
});