]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
fixes #22245: revamp the breakpoint-between and breakpoint-only mixins to actually...
authorMark Otto <markdotto@gmail.com>
Sun, 26 Mar 2017 05:23:40 +0000 (22:23 -0700)
committerMark Otto <markd.otto@gmail.com>
Sun, 26 Mar 2017 20:23:49 +0000 (13:23 -0700)
scss/mixins/_breakpoints.scss

index 904b60f7adde62985d04c6b3a416411db98a1a28..be1d034d84085a2c0d8b54c8aade382f05293f26 100644 (file)
 // Media that spans multiple breakpoint widths.
 // Makes the @content apply between the min and max breakpoints
 @mixin media-breakpoint-between($lower, $upper, $breakpoints: $grid-breakpoints) {
-  @include media-breakpoint-up($lower, $breakpoints) {
-    @include media-breakpoint-down($upper, $breakpoints) {
-      @content;
-    }
+  $min: breakpoint-max($lower, $breakpoints);
+  $max: breakpoint-max($upper, $breakpoints);
+
+  @media (min-width: $min) and (max-width: $max) {
+    @content;
   }
 }
 
 // No minimum for the smallest breakpoint, and no maximum for the largest one.
 // Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.
 @mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints) {
-  @include media-breakpoint-between($name, $name, $breakpoints) {
+  $min: breakpoint-min($name, $breakpoints);
+  $max: breakpoint-max($name, $breakpoints);
+
+  @media (min-width: $min) and (max-width: $max) {
     @content;
   }
 }