]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
take account 'none' for box-shadow (#27972)
authorwojtask9 <wojtask9.kde@gmail.com>
Mon, 7 Jan 2019 00:52:39 +0000 (01:52 +0100)
committerXhmikosR <xhmikosr@gmail.com>
Mon, 7 Jan 2019 00:52:39 +0000 (02:52 +0200)
scss/mixins/_box-shadow.scss
scss/mixins/_buttons.scss

index b2410e53ac3e59c5b0907c1ac079e4c7bc683f86..291d079728a439ad7a00fa1a9bbd9bd4ce8820bf 100644 (file)
@@ -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;
+    }
   }
 }
index 64cc482f69503f691d748a5408067447603d537f..c6bc523cdb4a4ce777f502225fc4ed2a191cdb7a 100644 (file)
@@ -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);