I'm trying to make a loop in SASS that generates scaffolding classes much like Foundation.
I tried this:
$colCount: 12;
$i: $colCount;
@while $i > 0 {
$result : ($i *100) /$colCount;
.container-#{$i}_#{$colCount} { width: $result% ; }
$i: $i - 1;
}
and expected somethig like this
.container-12_12 {
width: 100%;
}
.container-11_12 {
width: 91.6667%;
}
but this failed. When removing the '%' it worked out fine, except for the fact that the css is useless.