I am running this SASS code in my Rails app (3.2.17):
@each $text, $foreground, $background in (submitted, white, grey),
(partially_paid, white, orange),
(paid, white, green),
(accepted, white, blue),
(declined, red, black),
(waitinglist, black, grey),
(lastminute, white, pink),
(out, white, red),
(blacklist, white, black) {
.label-#{$text},
.badge-#{$text} {
background-color: #{$background} !important;
color: #{$foreground};
}
}
I tried to validate it with Sassmeister, and it seems to work http://sassmeister.com/gist/7144802
However Rails throws me an error like this:
Sass::SyntaxError - Invalid CSS after "@each $text": expected "in", was ", $foreground, ..."
What am I doing wrong?