您好,我正在尝试了解material-ui组件是如何工作的,我遇到了以下样式:
root: (0, _extends3.default)({}, theme.typography.subheading, {
height: theme.spacing.unit * 3,
boxSizing: 'content-box',
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
'&:hover': {
backgroundColor: theme.palette.text.lightDivider
},
'&$selected': {
backgroundColor: theme.palette.text.divider
}
}),
selected: {}
}
我想知道'&$selected‘在CSS语法中是什么意思。我遇到的问题是,我想覆盖背景颜色,将样式传递给selected,但它没有覆盖它。我想了解这里幕后发生的事情。谢谢!
https://stackoverflow.com/questions/50626150
复制相似问题