27 lines
661 B
SCSS
27 lines
661 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;
|
|
}
|
|
}
|
|
}
|