是否有办法让Singularity根据网格列的数量自动生成一组可用的类?
$grids: 12;
.span1-1 { @include grid-span(1,1);}
.span1-2 { @include grid-span(1,2);}
.span1-3 { @include grid-span(1,3);}
...
.span11-1 { @include grid-span(11,1);}
.span12 { @include grid-span(12);}
是:
$grids: 12;
$gutters: .5;
@for $i from 1 through $grids {
@for $n from 1 through $grids - $i + 1 {
.span#{$n}-#{$i} {
@include grid-span($n, $i);
overflow: visible !important;
}
}
}