mirror of
https://github.com/google/pebble.git
synced 2025-07-09 16:10:34 -04:00
83 lines
1.9 KiB
SCSS
Executable file
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;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|