2023-02-21 21:44:48 +01:00
|
|
|
@use 'config';
|
2023-01-12 19:19:42 +01:00
|
|
|
|
2023-01-06 22:40:29 +01:00
|
|
|
$sl-breakpoints: (
|
2023-01-09 20:10:02 +01:00
|
|
|
// for mixins to span across breakpoints and without one
|
|
|
|
none: 0,
|
2023-03-13 21:46:22 +01:00
|
|
|
small: config.$sl-breakpoint--small,
|
|
|
|
medium: config.$sl-breakpoint--medium,
|
|
|
|
large: config.$sl-breakpoint--large,
|
|
|
|
x-large: config.$sl-breakpoint--x-large
|
2023-01-06 22:40:29 +01:00
|
|
|
);
|
|
|
|
|
|
|
|
@mixin sl-breakpoint($breakpoint) {
|
2023-02-09 23:53:25 +01:00
|
|
|
@media only screen and (min-width: $breakpoint) {
|
2023-01-06 22:40:29 +01:00
|
|
|
@content;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin sl-breakpoint-max($breakpoint) {
|
2023-02-09 23:53:25 +01:00
|
|
|
@media only screen and (max-width: $breakpoint) {
|
2023-01-06 22:40:29 +01:00
|
|
|
@content;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin sl-breakpoint--small {
|
2023-03-13 21:46:22 +01:00
|
|
|
@include sl-breakpoint(config.$sl-breakpoint--small) {
|
2023-01-06 22:40:29 +01:00
|
|
|
@content;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin sl-breakpoint--small-max {
|
2023-03-13 21:46:22 +01:00
|
|
|
@include sl-breakpoint-max(config.$sl-breakpoint--small) {
|
2023-01-06 22:40:29 +01:00
|
|
|
@content;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin sl-breakpoint--medium {
|
2023-03-13 21:46:22 +01:00
|
|
|
@include sl-breakpoint(config.$sl-breakpoint--medium) {
|
2023-01-06 22:40:29 +01:00
|
|
|
@content;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin sl-breakpoint--medium-max {
|
2023-03-13 21:46:22 +01:00
|
|
|
@include sl-breakpoint-max(config.$sl-breakpoint--medium) {
|
2023-01-06 22:40:29 +01:00
|
|
|
@content;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin sl-breakpoint--large {
|
2023-03-13 21:46:22 +01:00
|
|
|
@include sl-breakpoint(config.$sl-breakpoint--large) {
|
2023-01-06 22:40:29 +01:00
|
|
|
@content;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin sl-breakpoint--large-max {
|
2023-03-13 21:46:22 +01:00
|
|
|
@include sl-breakpoint-max(config.$sl-breakpoint--large) {
|
2023-01-06 22:40:29 +01:00
|
|
|
@content;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin sl-breakpoint--x-large {
|
2023-03-13 21:46:22 +01:00
|
|
|
@include sl-breakpoint(config.$sl-breakpoint--x-large) {
|
2023-01-06 22:40:29 +01:00
|
|
|
@content;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin sl-breakpoint--x-large-max {
|
2023-03-13 21:46:22 +01:00
|
|
|
@include sl-breakpoint-max(config.$sl-breakpoint--x-large) {
|
2023-01-06 22:40:29 +01:00
|
|
|
@content;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-09 20:10:02 +01:00
|
|
|
@mixin sl-breakpoint-set($breakpoint, $size) {
|
2023-01-06 22:40:29 +01:00
|
|
|
@if $breakpoint == none {
|
|
|
|
@content;
|
2023-01-09 20:10:02 +01:00
|
|
|
} @else {
|
2023-01-06 22:40:29 +01:00
|
|
|
@include sl-breakpoint($size) {
|
|
|
|
@content;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|