Created
January 6, 2018 13:44
-
-
Save dlbnco/d69705de507d35358aa9fb7e8ea6e6b5 to your computer and use it in GitHub Desktop.
Create text and background color classes with SASS variables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$colors: ( | |
red: #ed3237, | |
blue: #3e4095, | |
white: #fff, | |
); | |
@each $value in $colors { | |
.text-#{nth($value, 1)} { | |
color: nth($value, 2); | |
} | |
.bg-#{nth($value, 1)} { | |
background-color: nth($value, 2); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment