I am trying to darken a variable number of divs like
with the following code:
@mixin color-divs ($count, $baseName, $startcolor) { $color: $startcolor; @for $i from 0 through $count { $color: darken($color, 9%);
With this code, which I expected, the $ color variable changes with each iteration, but this did not work as expected. The value is fixed after the initial initialization, and each element has the same color.
Is there a way to solve this problem or is there another way to solve this problem when mixing?
source share