I'm creating a bunch of heading styles using a @for loop but I can't get it to work with variable names, as in the following:
// Some variables (these work fine)
$h1-size: 3em;
$h2-size: 2em;
$h3-size: 1.6em;
etc...
// My loop
@for $i from 1 through 6 {
h#{$i} {
color: #333;
font-size: $h#{$i}-size; // DOESN'T WORK!
}
}
The loop works -- but only if i remove the part about font-size. Can I point at a dynamically constructed variable like this?