我经常使用混合器来存储代码块。例如:
@mixin ui-spot-badges($ui-spot-badges: ui-spot-badges) {
.#{$ui-spot-badges} {
position:relative;
@content;
&:after {
content:"";
position:absolute;
background:red;
}
}
}
@include ui-spot-badges(myclass);
我该如何将多个类传递给Mixin?例如:
@include ui-spot-badges(myclass, myclass2);
获取
.myclass, myclass2 {
position:relative;
}
.myclass:after, .myclass2:after {
content:"";
position:absolute;
background:red;
}
@mixin ui-spot-badges($badges...)
中的...
吗?它是必要的吗? - nu everest