2014-08-04 19:11:22 +04:00
|
|
|
//
|
|
|
|
// Buttons
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
// Base styles
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
.btn {
|
|
|
|
display: inline-block;
|
|
|
|
margin-bottom: 0; // For input.btn
|
2014-08-06 01:39:19 +04:00
|
|
|
padding: 9px 14px;
|
|
|
|
font-size: 1.1rem;
|
2014-08-04 19:57:33 +04:00
|
|
|
line-height: 1.428571429;
|
2014-08-06 01:39:19 +04:00
|
|
|
font-weight: 300;
|
2014-08-04 19:11:22 +04:00
|
|
|
text-align: center;
|
2014-08-06 01:39:19 +04:00
|
|
|
text-transform: uppercase;
|
|
|
|
text-shadow: none;
|
|
|
|
letter-spacing: 1px;
|
2014-08-04 19:11:22 +04:00
|
|
|
vertical-align: middle;
|
|
|
|
cursor: pointer;
|
|
|
|
background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
|
|
|
|
border: 1px solid transparent;
|
|
|
|
white-space: nowrap;
|
2014-08-04 19:57:33 +04:00
|
|
|
border-radius: $rounded;
|
2014-08-04 19:11:22 +04:00
|
|
|
@include user-select(none);
|
|
|
|
|
|
|
|
&,
|
|
|
|
&:active,
|
|
|
|
&.active {
|
|
|
|
&:focus {
|
|
|
|
@include tab-focus();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
2014-08-04 19:57:33 +04:00
|
|
|
color: $blue;
|
2014-08-04 19:11:22 +04:00
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:active,
|
|
|
|
&.active {
|
|
|
|
outline: 0;
|
|
|
|
background-image: none;
|
2014-08-04 20:24:41 +04:00
|
|
|
box-shadow: inset 0 2px 2px rgba(0,0,0,.125);
|
2014-08-04 19:11:22 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
&.disabled,
|
|
|
|
&[disabled],
|
|
|
|
fieldset[disabled] & {
|
|
|
|
cursor: not-allowed;
|
|
|
|
pointer-events: none; // Future-proof disabling of clicks
|
2014-08-04 19:57:33 +04:00
|
|
|
opacity: 0.65;
|
|
|
|
box-shadow: none;
|
2014-08-04 19:11:22 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Alternate buttons
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
2014-08-04 19:57:33 +04:00
|
|
|
@mixin button-style($color, $background, $border) {
|
|
|
|
color: $color;
|
|
|
|
background-color: $background;
|
|
|
|
border-color: $border;
|
2014-08-06 01:39:19 +04:00
|
|
|
@include transition(background 0.2s ease, border-color 0.2s ease);
|
2014-08-04 19:57:33 +04:00
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&:focus,
|
|
|
|
&:active,
|
|
|
|
&.active,
|
|
|
|
.open > &.dropdown-toggle {
|
|
|
|
color: $color;
|
|
|
|
background-color: darken($background, 10%);
|
|
|
|
border-color: darken($border, 12%);
|
|
|
|
}
|
|
|
|
&:active,
|
|
|
|
&.active,
|
|
|
|
.open > &.dropdown-toggle {
|
|
|
|
background-image: none;
|
|
|
|
}
|
|
|
|
&.disabled,
|
|
|
|
&[disabled],
|
|
|
|
fieldset[disabled] & {
|
|
|
|
&,
|
|
|
|
&:hover,
|
|
|
|
&:focus,
|
|
|
|
&:active,
|
|
|
|
&.active {
|
|
|
|
background-color: $background;
|
|
|
|
border-color: $border;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.badge {
|
|
|
|
color: $background;
|
|
|
|
background-color: $color;
|
2014-08-14 17:38:32 +04:00
|
|
|
box-shadow: 0 0 0 1px $color;
|
2014-08-04 19:57:33 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-08-04 19:11:22 +04:00
|
|
|
.btn-default {
|
2014-08-06 01:39:19 +04:00
|
|
|
font-weight: normal;
|
|
|
|
@include button-style(#666, #fff, lighten($midgrey, 40%));
|
2014-08-04 19:11:22 +04:00
|
|
|
}
|
2014-08-06 01:39:19 +04:00
|
|
|
.btn-alt {
|
|
|
|
@include button-style(#fff, #A1ADB3, darken(#A1ADB3, 5%));
|
|
|
|
}
|
|
|
|
.btn-blue {
|
2014-08-04 19:57:33 +04:00
|
|
|
@include button-style(#fff, $blue, darken($blue, 5%));
|
2014-08-04 19:11:22 +04:00
|
|
|
}
|
|
|
|
// Success appears as green
|
2014-08-06 01:39:19 +04:00
|
|
|
.btn-green {
|
2014-08-04 19:57:33 +04:00
|
|
|
@include button-style(#fff, $green, darken($green, 5%));
|
2014-08-04 19:11:22 +04:00
|
|
|
}
|
|
|
|
// Danger and error appear as red
|
2014-08-06 01:39:19 +04:00
|
|
|
.btn-red {
|
2014-08-04 19:57:33 +04:00
|
|
|
@include button-style(#fff, $red, darken($red, 5%));
|
2014-08-04 19:11:22 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Link buttons
|
|
|
|
// -------------------------
|
|
|
|
|
|
|
|
// Make a button look and behave like a link
|
|
|
|
.btn-link {
|
2014-08-04 19:57:33 +04:00
|
|
|
color: $blue;
|
2014-08-04 19:11:22 +04:00
|
|
|
font-weight: normal;
|
|
|
|
cursor: pointer;
|
|
|
|
border-radius: 0;
|
|
|
|
|
|
|
|
&,
|
|
|
|
&:active,
|
|
|
|
&[disabled],
|
|
|
|
fieldset[disabled] & {
|
|
|
|
background-color: transparent;
|
2014-08-04 19:57:33 +04:00
|
|
|
box-shadow: none;
|
2014-08-04 19:11:22 +04:00
|
|
|
}
|
|
|
|
&,
|
|
|
|
&:hover,
|
|
|
|
&:focus,
|
|
|
|
&:active {
|
2014-08-06 01:39:19 +04:00
|
|
|
color: $blue;
|
2014-08-04 19:11:22 +04:00
|
|
|
border-color: transparent;
|
|
|
|
}
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
text-decoration: underline;
|
|
|
|
background-color: transparent;
|
|
|
|
}
|
|
|
|
&[disabled],
|
|
|
|
fieldset[disabled] & {
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
2014-08-04 19:57:33 +04:00
|
|
|
color: $midgrey;
|
2014-08-04 19:11:22 +04:00
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-08-06 01:39:19 +04:00
|
|
|
// Minor buttons
|
|
|
|
// -------------------------
|
|
|
|
|
|
|
|
// Add this class to buttons with a small/insignificant action
|
|
|
|
// for example a "cancel" button. Style is de-emphasised.
|
|
|
|
.btn-minor {
|
|
|
|
text-transform: none;
|
|
|
|
letter-spacing: 0;
|
|
|
|
font-size: 1.2rem;
|
|
|
|
padding: 8px 14px;
|
|
|
|
}
|
|
|
|
|
2014-08-04 19:11:22 +04:00
|
|
|
// Button Sizes
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
.btn-lg {
|
2014-08-06 01:39:19 +04:00
|
|
|
padding: 12px 18px;
|
|
|
|
font-size: 1.4rem;
|
2014-08-04 19:57:33 +04:00
|
|
|
line-height: 1.33;
|
|
|
|
border-radius: 4px;
|
2014-08-04 19:11:22 +04:00
|
|
|
}
|
2014-08-04 19:57:33 +04:00
|
|
|
|
2014-08-04 19:11:22 +04:00
|
|
|
.btn-sm {
|
2014-08-06 01:39:19 +04:00
|
|
|
padding: 7px 10px;
|
|
|
|
font-size: 1rem;
|
2014-08-04 19:57:33 +04:00
|
|
|
line-height: 1.5;
|
|
|
|
border-radius: 2px;
|
2014-08-04 19:11:22 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Block button
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
.btn-block {
|
|
|
|
display: block;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Vertically space out multiple block buttons
|
|
|
|
.btn-block + .btn-block {
|
|
|
|
margin-top: 5px;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Specificity overrides
|
|
|
|
input[type="submit"],
|
|
|
|
input[type="reset"],
|
|
|
|
input[type="button"] {
|
|
|
|
&.btn-block {
|
|
|
|
width: 100%;
|
|
|
|
}
|
2014-07-30 08:47:54 +04:00
|
|
|
}
|