aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2016-12-27 14:45:57 -0800
committerMark Otto <[email protected]>2016-12-28 15:12:04 -0800
commitb449e6b65e957905ebe17ddb1fe0390cdce380f0 (patch)
tree7a062397ff27d718080d433636a8a7b34af6f7e8
parenta9bee8b6c8c31455dfba029434fad88b862c3846 (diff)
downloadbootstrap-b449e6b65e957905ebe17ddb1fe0390cdce380f0.tar.xz
bootstrap-b449e6b65e957905ebe17ddb1fe0390cdce380f0.zip
create a variable for the focus box-shadow, use it in the button base class
also be sure to apply it for the active state when shadows are enabled
-rw-r--r--scss/_buttons.scss4
-rw-r--r--scss/_variables.scss1
2 files changed, 3 insertions, 2 deletions
diff --git a/scss/_buttons.scss b/scss/_buttons.scss
index 5d2892236..e36ff0f1f 100644
--- a/scss/_buttons.scss
+++ b/scss/_buttons.scss
@@ -23,7 +23,7 @@
&:focus,
&.focus {
outline: 0;
- box-shadow: 0 0 0 2px rgba($brand-primary, .25);
+ box-shadow: $btn-focus-box-shadow;
}
// Disabled comes first so active can properly restyle
@@ -37,7 +37,7 @@
&:active,
&.active {
background-image: none;
- @include box-shadow($btn-active-box-shadow);
+ @include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow);
}
}
diff --git a/scss/_variables.scss b/scss/_variables.scss
index e7069f805..e6cbf63bf 100644
--- a/scss/_variables.scss
+++ b/scss/_variables.scss
@@ -367,6 +367,7 @@ $btn-padding-y: .5rem !default;
$btn-line-height: 1.25 !default;
$btn-font-weight: $font-weight-normal !default;
$btn-box-shadow: inset 0 1px 0 rgba($white,.15), 0 1px 1px rgba($black,.075) !default;
+$btn-focus-box-shadow: 0 0 0 2px rgba($brand-primary, .25) !default;
$btn-active-box-shadow: inset 0 3px 5px rgba($black,.125) !default;
$btn-primary-color: $white !default;