Skip to content

Instantly share code, notes, and snippets.

@andresmijares
Created September 5, 2014 20:37
Show Gist options
  • Save andresmijares/9d8d968edb87eb4cdbba to your computer and use it in GitHub Desktop.
Save andresmijares/9d8d968edb87eb4cdbba to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.3)
// Compass (v1.0.1)
// ----
$color1: #ffffff #000000 #444444;
@mixin themePicker($tema, $color1, $color2, $color3, $color4, $color5) {
$lista : $color1, $color2, $color3, $color4, $color5;
#theme#{$tema} {
@for $i from 1 through 5 {
span:nth-child(#{$i}) {
background: nth($lista, $i);
span:after {
content: "#{nth($lista, $i)}";
}
}
}
}
}
@include themePicker(1, #444444, #555555, #666666, #777777, #888888);
#theme1 span:nth-child(1) {
background: #444444;
}
#theme1 span:nth-child(1) span:after {
content: "#444444";
}
#theme1 span:nth-child(2) {
background: #555555;
}
#theme1 span:nth-child(2) span:after {
content: "#555555";
}
#theme1 span:nth-child(3) {
background: #666666;
}
#theme1 span:nth-child(3) span:after {
content: "#666666";
}
#theme1 span:nth-child(4) {
background: #777777;
}
#theme1 span:nth-child(4) span:after {
content: "#777777";
}
#theme1 span:nth-child(5) {
background: #888888;
}
#theme1 span:nth-child(5) span:after {
content: "#888888";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment