diff options
| author | Trent Clowater <[email protected]> | 2017-10-02 23:38:59 -0500 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2017-10-02 21:38:59 -0700 |
| commit | 7a7589ffc2786910b3bc7260467227f7d10a462a (patch) | |
| tree | c50e12bb8877826f77575f3d1192851c974a6e6e | |
| parent | ac69547314b59b29b975f9246ef7234f8a63886b (diff) | |
| download | bootstrap-7a7589ffc2786910b3bc7260467227f7d10a462a.tar.xz bootstrap-7a7589ffc2786910b3bc7260467227f7d10a462a.zip | |
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.
| -rw-r--r-- | scss/mixins/_breakpoints.scss | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/scss/mixins/_breakpoints.scss b/scss/mixins/_breakpoints.scss index 082c5f99b..a9866bd90 100644 --- a/scss/mixins/_breakpoints.scss +++ b/scss/mixins/_breakpoints.scss @@ -81,8 +81,18 @@ $min: breakpoint-min($lower, $breakpoints); $max: breakpoint-max($upper, $breakpoints); - @media (min-width: $min) and (max-width: $max) { - @content; + @if $min != null and $max != null { + @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; + } } } |
