mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-29 03:53:30 +08:00
refactor(breakpoints): improve warning message
This commit is contained in:
parent
843fb9805f
commit
d370a5f6af
@ -7,13 +7,12 @@ $breakpoints: (
|
||||
);
|
||||
|
||||
@mixin respond($breakpoint) {
|
||||
@if not map-has-key($breakpoints, $breakpoint) {
|
||||
@warn "'#{$breakpoint}' is not a valid breakpoint";
|
||||
}
|
||||
@each $bp, $size in $breakpoints {
|
||||
@if not map-has-key($breakpoints, $breakpoint) {
|
||||
@warn "'#{$breakpoint}' is not a valid breakpoint";
|
||||
} @else {
|
||||
@media (min-width: $size) {
|
||||
@content;
|
||||
}
|
||||
@media (min-width: $size) {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user