diff options
| author | wojtask9 <[email protected]> | 2019-01-07 01:52:39 +0100 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2019-01-07 02:52:39 +0200 |
| commit | 42bed436e86103ba85e56ea76a1c6cc6d16218ba (patch) | |
| tree | ee614d833ab9571f007624ea0b1b1ea8e711f27b | |
| parent | cbc8a7273a36ac5fe94d1fc7464674b6b7b4d60e (diff) | |
| download | bootstrap-42bed436e86103ba85e56ea76a1c6cc6d16218ba.tar.xz bootstrap-42bed436e86103ba85e56ea76a1c6cc6d16218ba.zip | |
take account 'none' for box-shadow (#27972)
| -rw-r--r-- | scss/mixins/_box-shadow.scss | 11 | ||||
| -rw-r--r-- | 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 b2410e53a..291d07972 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 64cc482f6..c6bc523cd 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); |
