MitseaBlog/themes/hugo-theme-stack/assets/scss/breakpoints.scss

18 lines
361 B
SCSS
Raw Permalink Normal View History

2022-10-11 17:34:41 +08:00
$breakpoints: (
sm: 640px,
md: 768px,
lg: 1024px,
xl: 1280px,
2xl: 1536px,
);
@mixin respond($breakpoint) {
@if not map-has-key($breakpoints, $breakpoint) {
@warn "'#{$breakpoint}' is not a valid breakpoint";
} @else {
@media (min-width: map-get($breakpoints, $breakpoint)) {
@content;
}
}
}