// /** // * Copyright (C) 2013 Crossing Hippos - Babs Gösgens. All rights reserved. // * Licensed under GNU General Public License version 2 or later !default; see LICENSE.txt // */ @if $trace-imports { @debug 'imported'; } // ========================================================================== // Button base class // ========================================================================== $button-base-class: "btn" !default; // ========================================================================== // Button base properties // ========================================================================== $button-cursor: pointer !default; $button-vertical-align: baseline; // ----------------------------------------------------------------------- // Button display (display, vertical-align) // ----------------------------------------------------------------------- $button-display: inline-block !default; $button-vertical-align: middle !default; // ----------------------------------------------------------------------- // Button padding (top, right, left, bottom) // ----------------------------------------------------------------------- $button-padding-top: vertical-rhythm(.25) !default; $button-padding-right: horizontal-rhythm(1/2) !default; $button-padding-bottom: vertical-rhythm(.25) !default; $button-padding-left: horizontal-rhythm(1/2) !default; // ----------------------------------------------------------------------- // Button background (background-color, background-image) // ----------------------------------------------------------------------- $button-background-color: $color-theme !default; // not base $button-background-image: false !default; // not base // ----------------------------------------------------------------------- // Button border (top, right, left, bottom) // ----------------------------------------------------------------------- $button-border-width: 1px !default; $button-border-style: solid !default; // not base $button-border-color: $button-background-color !default; // not base $button-border-radius: $corner-radius !default; // ----------------------------------------------------------------------- // Button shadow (box-shadow, inner-shadow) // ----------------------------------------------------------------------- $button-shadow-box-outer: false !default; $button-shadow-box-inner: false !default; // ----------------------------------------------------------------------- // Button text (color, shadow, align, decoration) // ----------------------------------------------------------------------- $button-text-color: $white !default; $button-text-shadow: -1px -1px 0 rgba(0,0,0,.3) !default; $button-text-align: center !default; $button-text-decoration: none !default; // ----------------------------------------------------------------------- // Button type (type, size, leading) // ----------------------------------------------------------------------- $button-type-type: $type-default !default; $button-type-size: $base-font-size !default; $button-type-rhythm: 1 !default; // ========================================================================== // Button hover state properties // ========================================================================== $button-hover-background-color: lighten($button-background-color, 20%) !default; $button-hover-background-image: false !default; $button-hover-border-color: $button-hover-background-color !default; // ========================================================================== // Button active state properties // $button-active-background-image: linear-gradient(lighten($button-active-background-color,5),darken($button-active-background-color,5)) // ========================================================================== $button-active-background-color: lighten($button-background-color, 20%) !default; $button-active-background-image: false !default; $button-active-border-color: $button-active-background-color !default; // ========================================================================== // Elements // ========================================================================== $button-base: $button-base-class, ( (cursor, ($button-cursor)) (display, ($button-display $button-vertical-align)) (padding, ($button-padding-top $button-padding-right $button-padding-bottom $button-padding-left)) (background, ($button-background-color $button-background-image)) (border, ($button-border-width $button-border-style $button-border-color)) (border-radius, ($button-border-radius)) (box-shadow, ($button-shadow-box-outer $button-shadow-box-inner)) (color, ($button-text-color)) (text, ($button-text-align $button-text-decoration $button-text-shadow)) (type, ($button-type-type $button-type-size $button-type-rhythm)) ), false !default; $button-state: 'state', ( (cursor, false) (display, false) (padding, false) (background, false) (border, false) (border-radius, false) (box-shadow, false) (color, false) (text, false) (type, false) ), true !default; $button: clone($button-base, "#{$button-base-class}", false) !default; $button-hover: new($button-state, "is-#{$button-base-class}-hover", true) !default; $button-active: new($button-state, "is-#{$button-base-class}-active", true) !default; $button-hover: change($button-hover, (background, ($button-hover-background-color $button-hover-background-image))); $button-hover: change($button-hover, (border, (false false $button-hover-border-color))); $button-active: change($button-active, (background, ($button-active-background-color $button-active-background-image))); $button-active: change($button-active, (border, (false false $button-active-border-color))); $buttons: $button, $button-hover, $button-active !default;