From 43c551e97d78f0145e4eaec2ffda09e49dbeb2a8 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 30 Dec 2017 20:55:35 -0800 Subject: [PATCH] Outline active focus (#25145) * Base the outline button :active color on the background, fixing a contrast issue * Only apply focus outline to active when it's focused --- scss/mixins/_buttons.scss | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scss/mixins/_buttons.scss b/scss/mixins/_buttons.scss index 252e26ace1..23a27f6b90 100644 --- a/scss/mixins/_buttons.scss +++ b/scss/mixins/_buttons.scss @@ -79,11 +79,14 @@ &:not([disabled]):not(.disabled):active, &:not([disabled]):not(.disabled).active, .show > &.dropdown-toggle { - color: color-yiq($color-hover); + color: color-yiq($active-background); background-color: $active-background; border-color: $active-border; - // Avoid using mixin so we can pass custom focus shadow properly - box-shadow: 0 0 0 $btn-focus-width rgba($color, .5); + + &:focus { + // Avoid using mixin so we can pass custom focus shadow properly + box-shadow: 0 0 0 $btn-focus-width rgba($color, .5); + } } }