src/scss/toolkit/mixins/_responsive.scss in titon-toolkit-0.9.4 vs src/scss/toolkit/mixins/_responsive.scss in titon-toolkit-0.10.0
- old
+ new
@@ -6,106 +6,106 @@
$breakpoint-tablet-portrait: 768px !default;
$breakpoint-mobile-landscape: 480px !default;
$breakpoint-mobile-portrait: 320px !default;
@mixin if-min($min) {
- @media only screen and (min-width: $min) {
- @content;
- }
+ @media only screen and (min-width: $min) {
+ @content;
+ }
}
@mixin if-max($max) {
- @media only screen and (max-width: $max) {
- @content;
- }
+ @media only screen and (max-width: $max) {
+ @content;
+ }
}
@mixin if-min-max($min, $max) {
- @media only screen and (min-width: $min) and (max-width: $max) {
- @content;
- }
+ @media only screen and (min-width: $min) and (max-width: $max) {
+ @content;
+ }
}
@mixin if-landscape {
- @media only screen and (orientation: landscape) {
- @content;
- }
+ @media only screen and (orientation: landscape) {
+ @content;
+ }
}
@mixin if-portrait {
- @media only screen and (orientation: portrait) {
- @content;
- }
+ @media only screen and (orientation: portrait) {
+ @content;
+ }
}
// Either support desktop-first or mobile-first responsive pattern
@mixin do-responsive($desktop, $mobile) {
- @if $responsive-design == "desktop" {
- @if $desktop {
- @include if-max($desktop) {
- @content;
- }
- } @else {
- @content;
- }
- } @else {
- @if $mobile {
- @include if-min($mobile) {
- @content;
- }
- } @else {
- @content;
- }
- }
+ @if $responsive-design == "desktop" {
+ @if $desktop {
+ @include if-max($desktop) {
+ @content;
+ }
+ } @else {
+ @content;
+ }
+ } @else {
+ @if $mobile {
+ @include if-min($mobile) {
+ @content;
+ }
+ } @else {
+ @content;
+ }
+ }
}
//-------------------- Breakpoints --------------------//
// Uses min or max
@mixin if-desktop {
- @include do-responsive(null, $breakpoint-tablet-landscape) {
- @content;
- }
+ @include do-responsive(null, $breakpoint-tablet-landscape) {
+ @content;
+ }
}
@mixin if-tablet-landscape {
- @include do-responsive($breakpoint-tablet-landscape, $breakpoint-tablet-portrait) {
- @content;
- }
+ @include do-responsive($breakpoint-tablet-landscape, $breakpoint-tablet-portrait) {
+ @content;
+ }
}
@mixin if-tablet-portrait {
- @include do-responsive($breakpoint-tablet-portrait, $breakpoint-mobile-landscape) {
- @content;
- }
+ @include do-responsive($breakpoint-tablet-portrait, $breakpoint-mobile-landscape) {
+ @content;
+ }
}
@mixin if-mobile-landscape {
- @include do-responsive($breakpoint-mobile-landscape, $breakpoint-mobile-portrait) {
- @content;
- }
+ @include do-responsive($breakpoint-mobile-landscape, $breakpoint-mobile-portrait) {
+ @content;
+ }
}
@mixin if-mobile-portrait {
- @include do-responsive($breakpoint-mobile-portrait, null) {
- @content;
- }
+ @include do-responsive($breakpoint-mobile-portrait, null) {
+ @content;
+ }
}
// Within 2 ranges
@mixin in-desktop {
- @include if-min($breakpoint-tablet-landscape + 1) {
- @content;
- }
+ @include if-min($breakpoint-tablet-landscape + 1) {
+ @content;
+ }
}
@mixin in-tablet {
- @include if-min-max($breakpoint-mobile-landscape + 1, $breakpoint-tablet-landscape) {
- @content;
- }
+ @include if-min-max($breakpoint-mobile-landscape + 1, $breakpoint-tablet-landscape) {
+ @content;
+ }
}
@mixin in-mobile {
- @include if-max($breakpoint-mobile-landscape) {
- @content;
- }
+ @include if-max($breakpoint-mobile-landscape) {
+ @content;
+ }
}
\ No newline at end of file