Skip to content

Instantly share code, notes, and snippets.

@pazaricha
Created March 6, 2014 09:55
Show Gist options
  • Save pazaricha/9386446 to your computer and use it in GitHub Desktop.
Save pazaricha/9386446 to your computer and use it in GitHub Desktop.
Sass Loop
// Album button colors
$album-buttons-colors: #1F69E0, #4DB811, #FF9200, #E6157D, #14BABA;
@for $i from 1 through length($album-buttons-colors) {
$color: nth($album-buttons-colors, $i);
.album-button-#{$i} {
color: #FFF;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
border-color: darken($color, 10%) darken($color, 15%) darken($color, 25%);
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
background-color: $color;
@include background-image(linear-gradient(top, $color, darken($color, 10%)));
&:hover {
color: #fff;
background-color: darken($color, 10%);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment