Sha256: 35d50865ff589beef9518ea82a265fe121d1fbc16ca5c3c553b55c4bc8302b60
Contents?: true
Size: 1.99 KB
Versions: 3
Compression:
Stored size: 1.99 KB
Contents
// ============= // EDGE BUTTON // ============= $button-color: $main-color !default; // --------------- // BUTTON :hover // --------------- @mixin button-hover($color) { &:hover { // Darken background if background is light @if is_light($color) { background-color: darken($color, 5%); } // Lighten background if background is dark @else { background-color: lighten($color, 5%); } } } // ----------------- // BUTTON :active // ----------------- @mixin button-active($color) { &:active { // Make it darker than hover state if background is light @if is_light($color) { background-color: darken($color, 10%); } // Darken background if background is dark @else { background-color: darken($color, 5%); } } } // --------------- // BUTTON :focus // --------------- @mixin button-focus() { &:focus { outline: none; } } // ----------------- // BUTTON // Create button // ----------------- @mixin button( $color : $button-color, $for-base : false) { @if $for-base { display: inline-block; cursor: pointer; position: relative; border: 1px solid transparent; padding: 10px 20px; text-transform: uppercase; font-weight: 700; letter-spacing: 1px; } background-color: $color; color: contrast-color($color, $body-font-color, white, 70%); @if $for-base { @include border-radius($g-radius); @include background-image(linear-gradient(top, rgba(white, .1), transparent ) ); @include transition($g-transition); @include box-shadow(inset 1px 1px rgba(white, .1) ); @include button-focus(); } @include button-hover($color); @include button-active($color); } @if $include-button and not $external-call { /* --------------- EDGE Button --------------- */ button, .button, input[type="submit"], input[type="reset"] { @include button($for-base: true); } } // $include-button
Version data entries
3 entries across 3 versions & 1 rubygems