我正在尝试使用 Bourbon Neat 网格混合器为网格创建一些类似 BS 的类。我的代码如下所示:
@each $num in 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 {
.span#{$num} {
@include span-columns(#{$num});
}
}
我想要发生的是:
.span1 {
@include span-columns(1);
}
.span2 {
@include span-columns(2);
}
//...
Grunt 构建日志说:
Syntax error: Undefined operation: "1 times 4.2358em".
on line 9 of bower_components/neat/app/assets/stylesheets/grid/_private.scss, in `span-columns'
from line 25 of app/sass/main.scss
所以我想不通的是为什么我不能将值从 $num 传递给 mixin。