aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaĆ«l Poupard <[email protected]>2020-08-18 16:37:01 +0200
committerMark Otto <[email protected]>2020-08-22 14:36:24 -0700
commit7058f8928641c847b6afb3a8ef2022ce75a5ded8 (patch)
treebeb6fc757f0ef59ad3084aa5de52d0d51bb793b6
parentb547ef4a85f87d20b5881991b116ba735e6cc8ba (diff)
downloadbootstrap-7058f8928641c847b6afb3a8ef2022ce75a5ded8.tar.xz
bootstrap-7058f8928641c847b6afb3a8ef2022ce75a5ded8.zip
fix(breakpoints): use next breakpoint when targetting xs only
-rw-r--r--scss/mixins/_breakpoints.scss7
1 files changed, 4 insertions, 3 deletions
diff --git a/scss/mixins/_breakpoints.scss b/scss/mixins/_breakpoints.scss
index 66a0050c1..cdc8034eb 100644
--- a/scss/mixins/_breakpoints.scss
+++ b/scss/mixins/_breakpoints.scss
@@ -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;
}
}