1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00

fix(breakpoints): use next breakpoint when targetting xs only

This commit is contained in:
Gaël Poupard 2020-08-18 16:37:01 +02:00 committed by Mark Otto
parent b547ef4a85
commit 7058f89286

View file

@ -107,8 +107,9 @@
// 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) {
@ -119,7 +120,7 @@
@content;
}
} @else if $min == null {
@include media-breakpoint-down($name, $breakpoints) {
@include media-breakpoint-down($next, $breakpoints) {
@content;
}
}