Skip to content

Instantly share code, notes, and snippets.

@fearrr
Created July 9, 2017 07:28
Show Gist options
  • Save fearrr/0b095b4830b179d2a5925e35226e2ac1 to your computer and use it in GitHub Desktop.
Save fearrr/0b095b4830b179d2a5925e35226e2ac1 to your computer and use it in GitHub Desktop.
$colors: (
$gray gray,
$gray-light gray-light,
$gray-lighter gray-lighter,
$gray-dark gray-dark,
$gray-darker gray-darker,
$gray-base gray-base
);
@mixin generate-colors() {
@each $color in $colors {
.color-#{nth($color, 2)} {
color: nth($color, 1);
}
.bg-#{nth($color, 2)} {
background: nth($color, 1);
}
.border-#{nth($color, 2)} {
border-color: nth($color, 1);
}
}
}
@include generate-colors();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment