mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-29 03:53:30 +08:00
Theme's stylesheet mixes the use of max-width and min-width for responsive design, and it's horrible.
33 lines
642 B
SCSS
33 lines
642 B
SCSS
$on-phone: 640px;
|
|
$on-tablet: 768px;
|
|
$on-desktop: 1024px;
|
|
$on-desktop-large: 1280px;
|
|
|
|
@mixin respond($breakpoint) {
|
|
@if ($breakpoint == sm) {
|
|
@media (min-width: 640px) {
|
|
@content;
|
|
}
|
|
}
|
|
@if ($breakpoint == md) {
|
|
@media (min-width: 768px) {
|
|
@content;
|
|
}
|
|
}
|
|
@if ($breakpoint == lg) {
|
|
@media (min-width: 1024px) {
|
|
@content;
|
|
}
|
|
}
|
|
@if ($breakpoint == xl) {
|
|
@media (min-width: 1280px) {
|
|
@content;
|
|
}
|
|
}
|
|
@if ($breakpoint == 2xl) {
|
|
@media (min-width: 1536px) {
|
|
@content;
|
|
}
|
|
}
|
|
}
|