0
是否可以传递参数列表以及另一个单独的参数。在列表和变量中传递混合
喜欢的东西
@mixin cols($width...,$gutter) {
....
}
@include cols((4,4,4),2%);
是否可以传递参数列表以及另一个单独的参数。在列表和变量中传递混合
喜欢的东西
@mixin cols($width...,$gutter) {
....
}
@include cols((4,4,4),2%);
我想是的,我们能做到that.non列表参数应列表前/数组参数
检查这个片段
@mixin box-shadow($color,$shadows...) {
-moz-box-shadow: $shadows;
-webkit-box-shadow: $shadows;
box-shadow: $shadows;
background:$color;
}
.shadows {
@include box-shadow('red',0px 4px 5px #666, 2px 6px 10px #999);
}
http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#variable_arguments
希望这有助于
谢谢,这对你的box-shadow mixin有效,但我需要用逗号发送参数列表,因为我使用了@for循环来应用值 – user2882335
所以你希望我使用for循环? – Geeky
它以任何方式帮助你...如果考虑接受答案 – Geeky