-1
我有几个颜色设置为类SASS密新 - 使用变量来填充类名
.black {background: $black;};
.red {background: $red;}
.yellow {background: $yellow;}
.grey {background: $grey;}
.white {background: $white;}
.blue {background: $blue;}
.full-black {background: #000;}
.light-black {background: #222;}
,但我想创建一个mixin这需要的类名,并自动创建的类名和填充背景颜色,所以我不必每次都输入了这一点..
我已经试过这样的事情
@mixin colours ($black,$full-black,$light-black,$red,$blue,$yellow,$white,$grey) {
.(colours): background:{colours};
}
但无法找出正确的代码。
http://stackoverflow.com/ a/16126625/2168947 – Brewal 2015-02-23 10:47:25
您是否正在寻找答案?请澄清。 – Harry 2015-02-23 10:53:30
你不需要一个混音,但每个,看看我的回应;) – 2015-02-23 10:58:05