Skip to content

Instantly share code, notes, and snippets.

@alcidesqueiroz
Last active September 21, 2018 22:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alcidesqueiroz/5dee7aeef573de803454df007df65607 to your computer and use it in GitHub Desktop.
Save alcidesqueiroz/5dee7aeef573de803454df007df65607 to your computer and use it in GitHub Desktop.
It's 2018: you shouldn't be writing vanilla CSS - Example 7
$colors = 'blue', 'black', 'yellow', 'aqua';
$dark-colors = 'blue', 'black';
for $color in $colors {
.btn--{$color} {
background-color: unquote($color);
if $color in $dark-colors {
color: white;
} else {
color: #222;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment