Skip to content

Instantly share code, notes, and snippets.

@hpstuff
Created July 8, 2015 14:33
Show Gist options
  • Select an option

  • Save hpstuff/3c31ec1cd7500db257f6 to your computer and use it in GitHub Desktop.

Select an option

Save hpstuff/3c31ec1cd7500db257f6 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.14)
// Compass (v1.0.3)
// ----
@mixin theme($themename, $color1, $color2) {
.#{$themename} {
.button {
color: $color1;
}
h1 {
background: $color2;
}
}
}
$themes: (
pink: #fff #000,
red: #faf #0a0
);
@each $name, $colors in $themes {
/* Theme ##{$name} */
@include theme($name, nth($colors, 1), nth($colors, 2));
/* end Theme ##{$name} */
}
/* Theme #pink */
.pink .button {
color: #fff;
}
.pink h1 {
background: #000;
}
/* end Theme #pink */
/* Theme #red */
.red .button {
color: #faf;
}
.red h1 {
background: #0a0;
}
/* end Theme #red */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment