Skip to content

Instantly share code, notes, and snippets.

@idan
Created October 15, 2012 13:56
Show Gist options
  • Save idan/3892579 to your computer and use it in GitHub Desktop.
Save idan/3892579 to your computer and use it in GitHub Desktop.
How can I make something like this work?
$color-0: rgb(202,0,32);
$color-1: rgb(244,165,130);
$color-2: rgb(247,247,247);
$color-3: rgb(146,197,222);
$color-4: rgb(5,113,176);
@mixin choropleth($bucket) {
.RdBu .q#{$bucket}-5 {
$base-fill: $color-#{$bucket};
fill: $base-fill;
@include transition;
@include transition-duration(0.25s);
&:hover {
fill: darken($base-fill, 10%);
}
}
}
@include choropleth("0");
@include choropleth("1");
@include choropleth("2");
@include choropleth("3");
@include choropleth("4");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment