postcss / sugarss

Indent-based CSS syntax for PostCSS
MIT License
708 stars 39 forks source link

Error on SASS syntax variable interpolation #60

Closed gespinha closed 7 years ago

gespinha commented 7 years ago

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:

$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?

Cheers!

ai commented 7 years ago

SugarSS is not Sass. You need postcss-sass.