mirror of
https://github.com/danog/sass-site.git
synced 2024-12-13 18:07:35 +01:00
21 lines
566 B
Plaintext
21 lines
566 B
Plaintext
$colors: <% data.color.colors.each do |swatch| %>$<%= swatch.name %> <% end %>;
|
|
|
|
@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 {
|
|
height: .25em;
|
|
@include background-image(stripes(left, ($colors)));
|
|
}
|