Skip to content

Instantly share code, notes, and snippets.

@feoche
Created November 19, 2015 10:52
Show Gist options
  • Save feoche/454f2b23cd4d38497d03 to your computer and use it in GitHub Desktop.
Save feoche/454f2b23cd4d38497d03 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.14)
// Compass (v1.0.3)
// ----
$c0: black;
$c1: white;
$c2: #e02021;
$c3: #F6F6F6;
$c4: #E6E6E6;
$c5: #4d4c4f;
$c6: #222222;
$c7: #E11B22;
$c8: #cccccc;
$c9: #7ab800;
$c10: #646464;
$c11: #cdcdcd;
$c12: #DF1B22;
$c13: #f2f2f2;
$c14: #cfcfcf;
$c15: #999;
$c16: #808080;
$c17: #999999;
$c18: #f2bf42;
$c19: #0b508f;
$grey: $c6;
$orange: $c18;
$green: $c9;
$blue: $c19;
$red: $c7;
$themes: glass-breakage collision park theft fire ;
$maincolor: $grey $orange $green $blue $red ;
@mixin theme($properties, $theming-properties, $lighten:0, $darken:0, $plus:'') {
@for $i from 1 through length($themes) {
.#{nth($themes, $i)} & {
@for $j from 1 through length($properties) {
#{nth($properties, $j)} :
#{if(
length($theming-properties) == length($properties),
#{if($lighten != 0,
lighten(nth(nth($theming-properties, $j), $i),
$lighten
),
if($darken != 0,
darken(nth(nth($theming-properties, $j), $i), $darken),
nth(nth($theming-properties, $j), $i)
)
)},
#{if($lighten != 0,
lighten(nth($theming-properties, $i),
$lighten
),
if($darken != 0,
darken(nth($theming-properties, $i), $darken),
nth($theming-properties, $i)
)
)}
)} #{unquote($plus)};
}
}
}
}
body {
@include theme(background, $maincolor);
}
.glass-breakage body {
background: #222222 ;
}
.collision body {
background: #f2bf42 ;
}
.park body {
background: #7ab800 ;
}
.theft body {
background: #0b508f ;
}
.fire body {
background: #E11B22 ;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment