Question

The following is an example from the SASS documentation:

@each $animal, $color, $cursor in (puma, black, default),
    (sea-slug, blue, pointer),
    (egret, white, move) {
  .#{$animal}-icon {
     background-image: url('/images/#{$animal}.png');
     border: 2px solid $color;
     cursor: $cursor;
   }
}

For some reason, it throws the following error:

error sass/screen.scss (Line 8: Invalid CSS after " @each $animal": expected "in", was ", $color, $curs...")

I tried uninstalling and reinstalling ruby/sass/compass to no avail. What gives? Here are the versions I have:

  • SASS 3.2.19
  • Compass 0.12.5
Was it helpful?

Solution

It looks like multiple assignment is SASS 3.3 feature. Maybe this will help.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top