hacker.tours-website/themes/zen/assets/sass/mixins/breakpoint/_respond-to.scss

28 lines
649 B
SCSS
Raw Normal View History

2024-06-13 22:14:05 +02:00
@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;
}
}
}