Css 为什么MuiThemeProvider会覆盖组件样式?
我有一个使用MuiThemeProvider的外部组件:Css 为什么MuiThemeProvider会覆盖组件样式?,css,reactjs,material-ui,Css,Reactjs,Material Ui,我有一个使用MuiThemeProvider的外部组件: <MuiThemeProvider theme={full_theme_e}> <div> <AppBar /> <Filter /> </div> </MuiThemeProvider> 适用于组件: <ExpansionPanel className={classNames(classes.expansionPanel, c
<MuiThemeProvider theme={full_theme_e}>
<div>
<AppBar />
<Filter />
</div>
</MuiThemeProvider>
适用于组件:
<ExpansionPanel className={classNames(classes.expansionPanel, className)}
问题是我的自定义样式被MuiThemeProvider覆盖了,为什么?
与:最后一个子项
,:第n个子项
css冒号选择器的语法:
'&:[selector]': {
...
}
与:最后一个子项
,:第n个子项
css冒号选择器的语法:
'&:[selector]': {
...
}
const styles = {
expansionPanel: {
'&:first-child': {
borderTopLeftRadius: 0,
borderTopRightRadius: 0,
borderBottomLeftRadius: 0,
borderBottomRightRadius: 0,
}
}
};
'&:[selector]': {
...
}