mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00
Fix media-breakpoint-between (#23997)
* Fix media-breakpoint-between When compiling .scss that uses media-breakpoint between with xs as the lower bound or xl as the upper bound, a compilation error can occur due to $min/$max being set to null, or the resulting .css can be invalid (see issue #23965). (This is basically the same fix that was applied to media-breakpoint-only a short time ago). * Update _breakpoints.scss Make houndci-bot recommended changes.
This commit is contained in:
parent
ac69547314
commit
7a7589ffc2
1 changed files with 12 additions and 2 deletions
|
@ -81,8 +81,18 @@
|
||||||
$min: breakpoint-min($lower, $breakpoints);
|
$min: breakpoint-min($lower, $breakpoints);
|
||||||
$max: breakpoint-max($upper, $breakpoints);
|
$max: breakpoint-max($upper, $breakpoints);
|
||||||
|
|
||||||
@media (min-width: $min) and (max-width: $max) {
|
@if $min != null and $max != null {
|
||||||
@content;
|
@media (min-width: $min) and (max-width: $max) {
|
||||||
|
@content;
|
||||||
|
}
|
||||||
|
} @else if $max == null {
|
||||||
|
@include media-breakpoint-up($lower) {
|
||||||
|
@content;
|
||||||
|
}
|
||||||
|
} @else if $min == null {
|
||||||
|
@include media-breakpoint-down($upper) {
|
||||||
|
@content;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue