From 005d0a719b30dec7df78b3aef21332e89d711b8c Mon Sep 17 00:00:00 2001 From: Ian Walter Date: Fri, 12 Oct 2018 15:34:43 -0400 Subject: [PATCH 1/2] Fixing #26372: disabled btn hover issue When gradients are enabled there is still a hover state on disabled buttons since the hover rules apply to background-image and disabled rules apply to background-color. This applies the logic already present in dropdowns to buttons. This fix was originally proposed by @ysds. --- scss/_buttons.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scss/_buttons.scss b/scss/_buttons.scss index af4f2dbe98c1..36cb6289a5db 100644 --- a/scss/_buttons.scss +++ b/scss/_buttons.scss @@ -32,6 +32,10 @@ &.disabled, &:disabled { opacity: $btn-disabled-opacity; + // Remove CSS gradients if they're enabled + @if $enable-gradients { + background-image: none; + } @include box-shadow(none); } From f9a5498c08b425f955b2b02b3a84c2d8189f2e26 Mon Sep 17 00:00:00 2001 From: Ian Walter Date: Fri, 12 Oct 2018 16:06:48 -0400 Subject: [PATCH 2/2] Moving fix to button-variant mixin The fix was tested in an unclean environment and didn't have a high enough specificity to work. Moving it into the disabled rules within the button-variant mixin is more appropriate and actually works. --- scss/_buttons.scss | 4 ---- scss/mixins/_buttons.scss | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scss/_buttons.scss b/scss/_buttons.scss index 36cb6289a5db..af4f2dbe98c1 100644 --- a/scss/_buttons.scss +++ b/scss/_buttons.scss @@ -32,10 +32,6 @@ &.disabled, &:disabled { opacity: $btn-disabled-opacity; - // Remove CSS gradients if they're enabled - @if $enable-gradients { - background-image: none; - } @include box-shadow(none); } diff --git a/scss/mixins/_buttons.scss b/scss/mixins/_buttons.scss index 646f473b3db6..6e9e92290874 100644 --- a/scss/mixins/_buttons.scss +++ b/scss/mixins/_buttons.scss @@ -31,6 +31,10 @@ color: color-yiq($background); background-color: $background; border-color: $border; + // Remove CSS gradients if they're enabled + @if $enable-gradients { + background-image: none; + } } &:not(:disabled):not(.disabled):active,