fictioneer-liminal/source/scss/common/_mixins.scss
2022-12-26 02:33:28 +01:00

28 lines
627 B
SCSS

$breakpoints: (
'mobile-s': (min-width: 320px),
'mobile-m': (min-width: 375px),
'mobile-l': (min-width: 425px),
'phablet': (min-width: 480px),
'landscape': (min-width: 550px),
'tablet': (min-width: 768px),
'desktop': (min-width: 1024px)
);
@mixin bp($name_or_pixel) {
@if map-has-key($breakpoints, $name_or_pixel) {
@media only screen and #{inspect(map-get($breakpoints, $name_or_pixel))} {
@content;
}
}
@else {
@media only screen and (min-width: $name_or_pixel) {
@content;
}
}
}
@mixin no-mobile-hover() {
@media (hover: hover) and (pointer: fine) {
@content;
}
}