]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
fix(breakpoints): use next breakpoint when targetting xs only
authorGaël Poupard <gael.poupard@orange.com>
Tue, 18 Aug 2020 14:37:01 +0000 (16:37 +0200)
committerMark Otto <otto@github.com>
Sat, 22 Aug 2020 21:36:24 +0000 (14:36 -0700)
scss/mixins/_breakpoints.scss

index 66a0050c1b34101b7123622f190a3f6ce56859a3..cdc8034eb357a5057a3842961264422b40b2546d 100644 (file)
 // 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) {
-  $min: breakpoint-min($name, $breakpoints);
-  $max: breakpoint-max(breakpoint-next($name, $breakpoints));
+  $min:  breakpoint-min($name, $breakpoints);
+  $next: breakpoint-next($name, $breakpoints);
+  $max:  breakpoint-max($next);
 
   @if $min != null and $max != null {
     @media (min-width: $min) and (max-width: $max) {
       @content;
     }
   } @else if $min == null {
-    @include media-breakpoint-down($name, $breakpoints) {
+    @include media-breakpoint-down($next, $breakpoints) {
       @content;
     }
   }