From ce02b5ed71d0e6e53d82ab316a7c63c28227f0df Mon Sep 17 00:00:00 2001 From: wojtask9 Date: Fri, 4 Jan 2019 12:17:32 +0100 Subject: [PATCH 1/2] take account 'none' for box-shadow --- scss/mixins/_box-shadow.scss | 11 ++++++++++- scss/mixins/_buttons.scss | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/scss/mixins/_box-shadow.scss b/scss/mixins/_box-shadow.scss index b2410e53ac3e..291d079728a4 100644 --- a/scss/mixins/_box-shadow.scss +++ b/scss/mixins/_box-shadow.scss @@ -1,5 +1,14 @@ @mixin box-shadow($shadow...) { @if $enable-shadows { - box-shadow: $shadow; + $result: (); + + @for $i from 1 through length($shadow) { + @if nth($shadow, $i) != "none" { + $result: append($result, nth($shadow, $i), "comma"); + } + } + @if (length($result) > 0) { + box-shadow: $result; + } } } diff --git a/scss/mixins/_buttons.scss b/scss/mixins/_buttons.scss index 64cc482f6950..6569081b0147 100644 --- a/scss/mixins/_buttons.scss +++ b/scss/mixins/_buttons.scss @@ -49,7 +49,7 @@ &:focus { // Avoid using mixin so we can pass custom focus shadow properly - @if $enable-shadows { + @if $enable-shadows and $btn-active-box-shadow!=none { box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5); } @else { box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5); From d512f13e5c876d360d221d37c3cc08c431a64f97 Mon Sep 17 00:00:00 2001 From: wojtask9 Date: Fri, 4 Jan 2019 12:27:32 +0100 Subject: [PATCH 2/2] fix lint --- scss/mixins/_buttons.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scss/mixins/_buttons.scss b/scss/mixins/_buttons.scss index 6569081b0147..c6bc523cdb4a 100644 --- a/scss/mixins/_buttons.scss +++ b/scss/mixins/_buttons.scss @@ -49,7 +49,7 @@ &:focus { // Avoid using mixin so we can pass custom focus shadow properly - @if $enable-shadows and $btn-active-box-shadow!=none { + @if $enable-shadows and $btn-active-box-shadow != none { box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5); } @else { box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);