Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap-rubygem.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'assets/stylesheets/bootstrap/mixins/_buttons.scss')
-rw-r--r--assets/stylesheets/bootstrap/mixins/_buttons.scss33
1 files changed, 22 insertions, 11 deletions
diff --git a/assets/stylesheets/bootstrap/mixins/_buttons.scss b/assets/stylesheets/bootstrap/mixins/_buttons.scss
index 7ce8fef..9e06261 100644
--- a/assets/stylesheets/bootstrap/mixins/_buttons.scss
+++ b/assets/stylesheets/bootstrap/mixins/_buttons.scss
@@ -3,25 +3,25 @@
// Easily pump out default styles, as well as :hover, :focus, :active,
// and disabled options for all buttons
-@mixin button-variant($background, $border, $active-background: darken($background, 7.5%), $active-border: darken($border, 10%)) {
- @include color-yiq($background);
- background-color: $background;
+@mixin button-variant($background, $border, $hover-background: darken($background, 7.5%), $hover-border: darken($border, 10%), $active-background: darken($background, 10%), $active-border: darken($border, 12.5%)) {
+ color: color-yiq($background);
+ @include gradient-bg($background);
border-color: $border;
@include box-shadow($btn-box-shadow);
@include hover {
- @include color-yiq($active-background);
- background-color: $active-background;
- border-color: $active-border;
+ color: color-yiq($hover-background);
+ @include gradient-bg($hover-background);
+ border-color: $hover-border;
}
&:focus,
&.focus {
// Avoid using mixin so we can pass custom focus shadow properly
@if $enable-shadows {
- box-shadow: $btn-box-shadow, 0 0 0 3px rgba($border, .5);
+ box-shadow: $btn-box-shadow, 0 0 0 $input-btn-focus-width rgba($border, .5);
} @else {
- box-shadow: 0 0 0 3px rgba($border, .5);
+ box-shadow: 0 0 0 $input-btn-focus-width rgba($border, .5);
}
}
@@ -35,10 +35,19 @@
&:not([disabled]):not(.disabled):active,
&:not([disabled]):not(.disabled).active,
.show > &.dropdown-toggle {
+ color: color-yiq($active-background);
background-color: $active-background;
- background-image: none; // Remove the gradient for the pressed/active state
+ @if $enable-gradients {
+ background-image: none; // Remove the gradient for the pressed/active state
+ }
border-color: $active-border;
- @include box-shadow($btn-active-box-shadow);
+
+ // Avoid using mixin so we can pass custom focus shadow properly
+ @if $enable-shadows {
+ box-shadow: $btn-active-box-shadow, 0 0 0 $input-btn-focus-width rgba($border, .5);
+ } @else {
+ box-shadow: 0 0 0 $input-btn-focus-width rgba($border, .5);
+ }
}
}
@@ -56,7 +65,7 @@
&:focus,
&.focus {
- box-shadow: 0 0 0 3px rgba($color, .5);
+ box-shadow: 0 0 0 $input-btn-focus-width rgba($color, .5);
}
&.disabled,
@@ -71,6 +80,8 @@
color: $color-hover;
background-color: $color;
border-color: $color;
+ // Avoid using mixin so we can pass custom focus shadow properly
+ box-shadow: 0 0 0 $input-btn-focus-width rgba($color, .5);
}
}