]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
box-shadow mixin fix (#28004)
authorwojtask9 <wojtask9.kde@gmail.com>
Tue, 8 Jan 2019 17:42:28 +0000 (18:42 +0100)
committerXhmikosR <xhmikosr@gmail.com>
Tue, 8 Jan 2019 17:42:28 +0000 (19:42 +0200)
scss/mixins/_box-shadow.scss

index 291d079728a439ad7a00fa1a9bbd9bd4ce8820bf..0726d4359a8f30eef0d0ca097a17994456343675 100644 (file)
@@ -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) {