aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwojtask9 <[email protected]>2019-01-08 18:42:28 +0100
committerXhmikosR <[email protected]>2019-01-08 19:42:28 +0200
commit5dcf7cd3b74a293987c2e097c5375b97edb238ec (patch)
treeb08b00c96fdd7e1e4ee1e8adab885731c97d7d8a
parentdc436427e9dcd74dded4cb79a0eb8ba16a1eb5d8 (diff)
downloadbootstrap-5dcf7cd3b74a293987c2e097c5375b97edb238ec.tar.xz
bootstrap-5dcf7cd3b74a293987c2e097c5375b97edb238ec.zip
box-shadow mixin fix (#28004)
-rw-r--r--scss/mixins/_box-shadow.scss12
1 files changed, 9 insertions, 3 deletions
diff --git a/scss/mixins/_box-shadow.scss b/scss/mixins/_box-shadow.scss
index 291d07972..0726d4359 100644
--- a/scss/mixins/_box-shadow.scss
+++ b/scss/mixins/_box-shadow.scss
@@ -2,9 +2,15 @@
@if $enable-shadows {
$result: ();
- @for $i from 1 through length($shadow) {
- @if nth($shadow, $i) != "none" {
- $result: append($result, nth($shadow, $i), "comma");
+ @if (length($shadow) == 1) {
+ // We can pass `@include box-shadow(none);`
+ $result: $shadow;
+ } @else {
+ // Filter to avoid invalid properties for example `box-shadow: none, 1px 1px black;`
+ @for $i from 1 through length($shadow) {
+ @if nth($shadow, $i) != "none" {
+ $result: append($result, nth($shadow, $i), "comma");
+ }
}
}
@if (length($result) > 0) {