Skip to content

Instantly share code, notes, and snippets.

@kawasako
Last active December 21, 2015 17:49
Show Gist options
  • Save kawasako/6342876 to your computer and use it in GitHub Desktop.
Save kawasako/6342876 to your computer and use it in GitHub Desktop.
SCSS @each
// Example
$colors: red, blue, green;
@each $color in $colors {
.#{$color} {
color: $color;
}
}
//Result
.red {
color: red;
}
.blue {
color: blue;
}
.green {
color: green;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment