Skip to content

Instantly share code, notes, and snippets.

@fearrr
Created July 9, 2017 07:28
Show Gist options
  • Select an option

  • Save fearrr/0b095b4830b179d2a5925e35226e2ac1 to your computer and use it in GitHub Desktop.

Select an option

Save fearrr/0b095b4830b179d2a5925e35226e2ac1 to your computer and use it in GitHub Desktop.

Revisions

  1. fearrr created this gist Jul 9, 2017.
    24 changes: 24 additions & 0 deletions color_generator.scss
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    $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();