I was wondering if you can get an element index for the @each loop.
I have the following code, but I was wondering if the $i
variable was the best way t
First of all, the @each
function is not from Compass, but from Sass.
To answer your question, this cannot be done with an each loop, but it is easy to convert this into a @for loop, which can do this:
@for $i from 1 through length($refcolors) {
$c: nth($refcolors, $i);
// ... do something fancy with $c
}