我的混音少了。当我将它应用到一个元素时,如果存在一个body类,我希望它的样式略有不同。
这是:
.mixin() {
font-weight: bold;
color: red;
}
.element {
.mixin()
}
Outputs to this:
.element {
font-weight: bold;
color: red;
}
But I also want this to be outputted:
.body-class .element {
color: blue;
}发布于 2015-02-19 13:45:47
您可以这样定义您的混合体:
.mixin() {
font-weight: bold;
color: red;
.body-class & {
color: blue;
}
}https://stackoverflow.com/questions/28607897
复制相似问题