]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Fix mixin media-breakpoint-only
authorKen Paulsen <ken.paulsen@gmail.com>
Thu, 4 May 2017 08:54:59 +0000 (10:54 +0200)
committerMark Otto <markd.otto@gmail.com>
Sun, 18 Jun 2017 09:08:11 +0000 (02:08 -0700)
Prevent mixin media-breakpoint-only from breaking when supplying the
first or last entry in $grid-breakpoints.

scss/mixins/_breakpoints.scss

index be1d034d84085a2c0d8b54c8aade382f05293f26..9a374fee6585afcddbc57bba3ab3dee05d1ba65d 100644 (file)
   $min: breakpoint-min($name, $breakpoints);
   $max: breakpoint-max($name, $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($name)
+  } @else if $min == null {
+    @include media-breakpoint-down($name)
   }
 }