2015-10-14 02:13:58 +02:00
|
|
|
$colors: <% data.color.colors.each do |swatch| %>$<%= swatch.name %> <% end %>;
|
2013-10-09 12:30:53 +02:00
|
|
|
|
|
|
|
@function stripes($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 {
|
2013-10-14 21:55:24 +02:00
|
|
|
height: .25em;
|
2013-10-09 12:30:53 +02:00
|
|
|
@include background-image(stripes(left, ($colors)));
|
|
|
|
}
|