Meyer // - $position: the starting position or angle of the gradient. // - $colors: a list of all the colors to be used. @function pop-stripe($position, $colors) $colors: if(type-of($colors) != 'list', compact($colors), $colors) $gradient: compact() $width: 100% / length($colors) @for $i from 1 through length($colors) $pop: nth($colors, $i) $new: $pop ($width * ($i - 1)), $pop ($width * $i) $gradient: join($gradient, $new, comma) @return linear-gradient($position, $gradient) .pop-stripe +background-image(pop-stripe(left, ($stripe-colors)))