[Mobile] Fix for emu and act

Adds 2 landscape conditions for tablets and
phones to check if they are in landscape, in
the actual tablet, or in an emulate of the tablet,
then it displays.
This commit is contained in:
Shivam Dave
2015-07-13 10:32:58 -07:00
parent 687f810475
commit 885433390e
4 changed files with 25 additions and 20 deletions

View File

@ -40,12 +40,15 @@ $tabHeiPorCheck: "(min-height: #{$tabMinH}) and (max-height: #{$tabMaxH})";
$tabHeiLanCheck: "(min-width: #{$tabMinH}) and (max-width: #{$tabMaxH})";
$mobileDevice: "(max-device-width: #{$tabMaxW}) and (max-device-height: #{$tabMaxH})";
$mobileDeviceEmu: "(max-device-width: #{$tabMaxH}) and (max-device-height: #{$tabMaxW})";
$phoneWidth: "screen and #{$phoWidPorCheck} and #{$phoHeiPorCheck} and #{$mobileDevice} and (orientation: portrait)";
$phoneHeight: "screen and #{$phoWidLanCheck} and #{$phoHeiLanCheck} and (orientation: landscape)";
$phoneHeight: "screen and #{$phoWidLanCheck} and #{$phoHeiLanCheck} and #{$mobileDevice} and (orientation: landscape)";
$phoneHeightEmu: "screen and #{$phoWidLanCheck} and #{$phoHeiLanCheck} and #{$mobileDeviceEmu} and (orientation: landscape)";
$tabletWidth: "screen and #{$tabWidPorCheck} and #{$tabHeiPorCheck} and #{$mobileDevice} and (orientation: portrait)";
$tabletHeight: "screen and #{$tabWidLanCheck} and #{$tabHeiLanCheck} and (orientation: landscape)";
$tabletHeight: "screen and #{$tabWidLanCheck} and #{$tabHeiLanCheck} and #{$mobileDevice} and (orientation: landscape)";
$tabletHeightEmu: "screen and #{$tabWidLanCheck} and #{$tabHeiLanCheck} and #{$mobileDeviceEmu} and (orientation: landscape)";
$compMinW: 800px;
$compMinH: 1025px;

View File

@ -23,14 +23,16 @@
// NOTE: Mixins for devices
@mixin phone {
@media #{$phoneWidth},
#{$phoneHeight} {
#{$phoneHeight},
#{$phoneHeightEmu}{
@content
}
}
@mixin tablet {
@media #{$tabletWidth},
#{$tabletHeight} {
#{$tabletHeight},
#{$tabletHeightEmu}{
@content
}
}