I have this code in my postcss file
.btn.color1>button{background:$graph_1;}
.btn.color2>button{background:$graph_2;}
.btn.color3>button{background:$graph_3;}
.btn.color4>button{background:$graph_4;}
.btn.color5>button{background:$graph_5;}
well, i thought this could be shorten by using for loops
@for $i from 1 to 5 {
.btn.color$i>button{background:$graph_$i;}
}
but there was a problem. $graph_$i
couldn't be resolved like $graph_1
,
it just remained as $graph_$i
.
is there any good solutions for this situation?