]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Fix media-breakpoint-between (#23997)
authorTrent Clowater <trentclowater@gmail.com>
Tue, 3 Oct 2017 04:38:59 +0000 (23:38 -0500)
committerMark Otto <markd.otto@gmail.com>
Tue, 3 Oct 2017 04:38:59 +0000 (21:38 -0700)
* Fix media-breakpoint-between

When compiling .scss that uses media-breakpoint between with xs as the lower bound or xl as the upper bound, a compilation error can occur due to $min/$max being set to null, or the resulting .css can be invalid (see issue #23965).

(This is basically the same fix that was applied to media-breakpoint-only a short time ago).

* Update _breakpoints.scss

Make houndci-bot recommended changes.

scss/mixins/_breakpoints.scss

index 082c5f99b5f0074e2fe7cf55b9f5cc68a6ba665e..a9866bd90731065a816b63dfe3b6760cc5f2f782 100644 (file)
   $min: breakpoint-min($lower, $breakpoints);
   $max: breakpoint-max($upper, $breakpoints);
 
-  @media (min-width: $min) and (max-width: $max) {
-    @content;
+  @if $min != null and $max != null {
+    @media (min-width: $min) and (max-width: $max) {
+      @content;
+    }
+  } @else if $max == null {
+    @include media-breakpoint-up($lower) {
+      @content;
+    }
+  } @else if $min == null {
+    @include media-breakpoint-down($upper) {
+      @content;
+    }
   }
 }