fix(breakpoint): return only the requested breakpoint

This commit is contained in:
Jimmy 2021-06-20 12:31:30 +02:00
parent d370a5f6af
commit 5ed3550fd7

View File

@ -9,9 +9,8 @@ $breakpoints: (
@mixin respond($breakpoint) { @mixin respond($breakpoint) {
@if not map-has-key($breakpoints, $breakpoint) { @if not map-has-key($breakpoints, $breakpoint) {
@warn "'#{$breakpoint}' is not a valid breakpoint"; @warn "'#{$breakpoint}' is not a valid breakpoint";
} } @else {
@each $bp, $size in $breakpoints { @media (min-width: map-get($breakpoints, $breakpoint)) {
@media (min-width: $size) {
@content; @content;
} }
} }