Prevent mixin media-breakpoint-only from breaking when supplying the
first or last entry in $grid-breakpoints.
$min: breakpoint-min($name, $breakpoints);
$max: breakpoint-max($name, $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($name)
+ } @else if $min == null {
+ @include media-breakpoint-down($name)
}
}