Sass @each with multiple variables

Just came across this, have the answer for you. In Sass, you can actually have a multidimensional list, so instead of constructing individual variables, you’d create one variable to hold them all, then loop over them: $zoo: puma black, sea-slug green, egret brown, salamander red; @each $animal in $zoo { .#{nth($animal, 1)}-icon { background-color: nth($animal, … Read more

Is Sass 3.3 compatible with Compass?

Compass 0.12 explicitly depends on Sass 3.2. Even if you have a newer version of Sass installed, it will still compile with 3.2. In order to use Sass 3.3 or later, you have to be using Compass 1.0 or later. Running the gem install command normally should get you the latest stable version. gem install … Read more

Using a function in Sass is returning the string containing the name of the function rather than the result

Your function doesn’t exist. You must declare it (or import it from another file) before you use it. Sass does not throw errors for non-existent functions because they have a similar syntax to CSS functions. So it assumes that if it isn’t a Sass function that it must be a CSS function. Related: Test whether … Read more