mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-08 14:46:34 +02:00
fix(breakpoints): use next breakpoint when targetting xs only
This commit is contained in:
@@ -108,7 +108,8 @@
|
|||||||
// Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.
|
// Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.
|
||||||
@mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints) {
|
@mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints) {
|
||||||
$min: breakpoint-min($name, $breakpoints);
|
$min: breakpoint-min($name, $breakpoints);
|
||||||
$max: breakpoint-max(breakpoint-next($name, $breakpoints));
|
$next: breakpoint-next($name, $breakpoints);
|
||||||
|
$max: breakpoint-max($next);
|
||||||
|
|
||||||
@if $min != null and $max != null {
|
@if $min != null and $max != null {
|
||||||
@media (min-width: $min) and (max-width: $max) {
|
@media (min-width: $min) and (max-width: $max) {
|
||||||
@@ -119,7 +120,7 @@
|
|||||||
@content;
|
@content;
|
||||||
}
|
}
|
||||||
} @else if $min == null {
|
} @else if $min == null {
|
||||||
@include media-breakpoint-down($name, $breakpoints) {
|
@include media-breakpoint-down($next, $breakpoints) {
|
||||||
@content;
|
@content;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user