pebble/third_party/responsive/sass/responsive/utilities/mixins/_push-pull.scss
2025-02-24 18:58:29 -08:00

83 lines
1.9 KiB
SCSS
Executable file

//==
// Creates float classes for each breakpoint.
//##
@mixin push-pull($bp) {
// XS doesn't have a min value.
@if $bp == xs {
.push-#{$bp} {
float: right !important;
[dir="rtl"] & {
float: left !important;
}
}
.pull-#{$bp} {
float: left !important;
[dir="rtl"] & {
float: right !important;
}
}
@include bp-max($bp) {
.push-#{$bp}-only {
float: right !important;
[dir="rtl"] & {
float: left !important;
}
}
.pull-#{$bp}-only {
float: left !important;
[dir="rtl"] & {
float: right !important;
}
}
}
}
@else {
@include bp-min($bp) {
.push-#{$bp} {
float: right !important;
[dir="rtl"] & {
float: left !important;
}
}
.pull-#{$bp} {
float: left !important;
[dir="rtl"] & {
float: right !important;
}
}
// Large doesn't need an "only" since it operates on min width.
@if $bp != l {
@include bp-max($bp) {
.push-#{$bp}-only {
float: right !important;
[dir="rtl"] & {
float: left !important;
}
}
.pull-#{$bp}-only {
float: left !important;
[dir="rtl"] & {
float: right !important;
}
}
}
}
}
}
}