Increase color saturation with sass mixin

Viewed 298

I'm trying to write looped mixin that iteratively increases the saturation of a background-color. Here's the latest mixin code:

@mixin generateBackgroundSteps($cell-count, $color) {
    @for $i from 0 through $cell-count - 1 {
        $percent: (5 * $i) + "%";
        $new-color: saturate($color, $percent);

        &[setting-id="#{$i}"] {
            background-color: $new-color;                
        }
    }
}

No matter how I've altered this, the produced css just keeps looking like this:

.rubric-design .rubric .create-new-criteria .create-criteria-initial-
settings .create-criteria-setting[setting-id="2"] {
      background-color: saturate(#90afc8);
}

Maybe it's the way I'm forming $percent. It must be something obvious!

1 Answers
Related