Sha256: 44300c25662bf1ed0fdbe7f9221ecbff1d221aa904ece2a490caf2dfed501fc9
Contents?: true
Size: 1.08 KB
Versions: 3
Compression:
Stored size: 1.08 KB
Contents
// Pie Chart Variables $pie-color: #f45c5c !default; @mixin darkened-children($num-children, $color) { @for $i from 1 through $num-children { $color: scale-color($color, $lightness: -10%); & > *:nth-child(#{$num-children}n+#{$i}) { // This causes looping to occur after there are $num-children child elements. color: $color; } } } @mixin lightened-children($num-children, $color) { @for $i from 1 through $num-children { $color: scale-color($color, $lightness: 10%); & > *:nth-child(#{$num-children}n+#{$i}) { // This causes looping to occur after there are $num-children child elements. color: $color; } } } [data-pie-id], [data-bar-id], [data-line-id] { @include darkened-children(7, $pie-color); } // Set the SVG to 100% width to smooth responsive resizing (optional) #pie, #donut, #bar { max-height: 450px; } #bar { // height: 300px; } svg { width: 100%; height: auto; } .tooltip { margin-left: -5px; border-radius: 3px; padding: 5px; } // svg text { // fill: $label-color; // } ul[data-pie-id] { list-style: none; padding: 10px; }
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
pizza-rails-0.2.1.2 | vendor/assets/stylesheets/pizza.scss |
pizza-rails-0.2.1.1 | vendor/assets/stylesheets/pizza.scss |
pizza-rails-0.2.1 | vendor/assets/stylesheets/pizza.scss |