Skip to content

Commit a47f373

Browse files
ken-gurumdo
authored andcommitted
Fix mixin media-breakpoint-only
Prevent mixin media-breakpoint-only from breaking when supplying the first or last entry in $grid-breakpoints.
1 parent 72a0093 commit a47f373

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

scss/mixins/_breakpoints.scss

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,13 @@
9393
$min: breakpoint-min($name, $breakpoints);
9494
$max: breakpoint-max($name, $breakpoints);
9595

96-
@media (min-width: $min) and (max-width: $max) {
97-
@content;
96+
@if $min != null and $max != null {
97+
@media (min-width: $min) and (max-width: $max) {
98+
@content;
99+
}
100+
} @else if $max == null {
101+
@include media-breakpoint-up($name)
102+
} @else if $min == null {
103+
@include media-breakpoint-down($name)
98104
}
99105
}

0 commit comments

Comments
 (0)