Created
August 1, 2019 21:15
-
-
Save jackkeller/03e9570cef57c8749535bbbd0b36be35 to your computer and use it in GitHub Desktop.
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
$direction-list: left right center | |
@each $direction in $direction-list | |
$i: index($direction-list, $direction) //only needed if you need an index | |
.align-#{$direction} | |
text-align: $direction | |
// And as a Key/Value thing (helpful if you use the same word but one needs to be treated as a variable) | |
$background-list: geyser $geyser, smaltblue $smaltblue, salmon $salmon | |
@each $background in $background-list | |
$key: nth($background, 1); | |
$value: nth($background, 2); | |
.bg-#{$key} | |
background-color: $value |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment