I'm using Sugarss as a postcss plugin to work with SASS syntax. Using the following example returns and error "Unnecessary curly bracket" because of the .#{nth($color, $i)} variable interpolation:
$color: red, green, blue
@for $i from 1 through length($color)
.#{nth($color, $i)}
color: nth($color, $i)
There is no other way, that I know of, to interpolate a variable inside a loop in SASS syntax. Can you please help me understand what is going wrong? Is this a known issue?
Hi there,
I'm using Sugarss as a postcss plugin to work with SASS syntax. Using the following example returns and error "Unnecessary curly bracket" because of the
.#{nth($color, $i)}
variable interpolation:There is no other way, that I know of, to interpolate a variable inside a loop in SASS syntax. Can you please help me understand what is going wrong? Is this a known issue?
Cheers!