Fix mixin media-breakpoint-only

Prevent mixin media-breakpoint-only from breaking when supplying the
first or last entry in $grid-breakpoints.
This commit is contained in:
Ken Paulsen 2017-05-04 10:54:59 +02:00 committed by Mark Otto
parent 72a0093200
commit a47f373e82
1 changed files with 8 additions and 2 deletions

View File

@ -93,7 +93,13 @@
$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)
}
}