Sha256: fb426b2d44444a9886637a6148e3f899e3da9a840602c1e90d9c06d2b9989f02
Contents?: true
Size: 889 Bytes
Versions: 2
Compression:
Stored size: 889 Bytes
Contents
//load functions before calling them @function set-text-color($color) { @if (lightness($color) > 60%) { @return rgba($black, $transparent-weak); // Lighter backgorund, return dark color } @else { @return rgba($white, $transparent-strong); // Darker background, return light color } } //DEFAULT .button{ background-color: $primary-color; color: set-text-color($primary-color); } .button:hover{ background-color: lighten($primary-color, $transition-brighten); } //BUTTON GENERATOR FOR EACH COLOR @each $color in $button-classes { $i: index($button-classes, $color); $temp-color: nth($button-define, $i); .button.#{$color}{ background-color: $temp-color; color: set-text-color($temp-color); } .button.#{$color}:hover{ background-color: lighten($temp-color, $transition-brighten); } } //MODIFY DEFAULT STYLE //APPEND ADDITIONAL GENERATORS WITH COMMANDS AS NEEDED
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
staple-0.1.2 | source/stylesheets/staple/build_buttons.scss |
staple-0.1.1 | source/stylesheets/staple/build_buttons.scss |