28 lines
649 B
SCSS
28 lines
649 B
SCSS
|
@mixin respond-to($breakpoint) {
|
||
|
// If the key exists in the map
|
||
|
@if map-has-key($breakpoints, $breakpoint) {
|
||
|
// Prints a media query based on the value
|
||
|
@media (min-width: map-get($breakpoints, $breakpoint)) {
|
||
|
@content;
|
||
|
}
|
||
|
} @else {
|
||
|
@media (min-width: $breakpoint) {
|
||
|
@content;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@mixin respond-to-max($breakpoint) {
|
||
|
// If the key exists in the map
|
||
|
@if map-has-key($breakpoints, $breakpoint) {
|
||
|
// Prints a media query based on the value
|
||
|
@media (max-width: map-get($breakpoints, $breakpoint)) {
|
||
|
@content;
|
||
|
}
|
||
|
} @else {
|
||
|
@media (max-width: $breakpoint) {
|
||
|
@content;
|
||
|
}
|
||
|
}
|
||
|
}
|