From 6a8e069a2f1653fd351a93e3b4bbda866e891a7e Mon Sep 17 00:00:00 2001 From: wojtask9 Date: Tue, 8 Jan 2019 16:48:56 +0100 Subject: [PATCH 1/2] fix box-shadow mixin --- scss/mixins/_box-shadow.scss | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scss/mixins/_box-shadow.scss b/scss/mixins/_box-shadow.scss index 291d079728a4..07593b9fb555 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) { From d202b72dc760c1ac52521fdd03026185ea6e404f Mon Sep 17 00:00:00 2001 From: Martijn Cuppens Date: Tue, 8 Jan 2019 18:15:24 +0100 Subject: [PATCH 2/2] Comment tweaks --- scss/mixins/_box-shadow.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scss/mixins/_box-shadow.scss b/scss/mixins/_box-shadow.scss index 07593b9fb555..0726d4359a8f 100644 --- a/scss/mixins/_box-shadow.scss +++ b/scss/mixins/_box-shadow.scss @@ -3,10 +3,10 @@ $result: (); @if (length($shadow) == 1) { - // we can pass @include box-shadow(none); + // We can pass `@include box-shadow(none);` $result: $shadow; } @else { - // filter to avoid invalid properties for example box-shadow: none, 1px 1px black; + // 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");