3 // Easily pump out default styles, as well as :hover, :focus, :active,
4 // and disabled options for all buttons
6 @mixin button-variant($color, $background, $border) {
7 $active-background: darken($background, 10%);
8 $active-border: darken($border, 12%);
11 background-color: $background;
12 border-color: $border;
13 @include box-shadow($btn-box-shadow);
15 // Hover and focus styles are shared
18 background-color: $active-background;
19 border-color: $active-border;
23 // Avoid using mixin so we can pass custom focus shadow properly
25 box-shadow: $btn-box-shadow, 0 0 0 2px rgba($border, .5);
27 box-shadow: 0 0 0 2px rgba($border, .5);
31 // Disabled comes first so active can properly restyle
34 background-color: $background;
35 border-color: $border;
40 .show > &.dropdown-toggle {
42 background-color: $active-background;
43 background-image: none; // Remove the gradient for the pressed/active state
44 border-color: $active-border;
45 @include box-shadow($btn-active-box-shadow);
49 @mixin button-outline-variant($color, $color-hover: #fff) {
51 background-image: none;
52 background-color: transparent;
57 background-color: $color;
63 box-shadow: 0 0 0 2px rgba($color, .5);
69 background-color: transparent;
74 .show > &.dropdown-toggle {
76 background-color: $color;
82 @mixin button-size($padding-y, $padding-x, $font-size, $border-radius) {
83 padding: $padding-y $padding-x;
84 font-size: $font-size;
85 @include border-radius($border-radius);