From 885433390e0778891a724e48a3ad02d5b24bbd27 Mon Sep 17 00:00:00 2001 From: Shivam Dave Date: Mon, 13 Jul 2015 10:32:58 -0700 Subject: [PATCH] [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. --- platform/commonUI/general/res/css/items.css | 8 +++---- .../general/res/css/theme-espresso.css | 24 +++++++++---------- .../general/res/sass/mobile/_constants.scss | 7 ++++-- .../general/res/sass/mobile/_mixins.scss | 6 +++-- 4 files changed, 25 insertions(+), 20 deletions(-) diff --git a/platform/commonUI/general/res/css/items.css b/platform/commonUI/general/res/css/items.css index d348a96d9a..c0b691e897 100644 --- a/platform/commonUI/general/res/css/items.css +++ b/platform/commonUI/general/res/css/items.css @@ -347,12 +347,12 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -@media screen and (max-width: 514px) and (max-height: 740px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (max-height: 514px) and (max-width: 740px) and (orientation: landscape) { +@media screen and (max-width: 514px) and (max-height: 740px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (max-height: 514px) and (max-width: 740px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: landscape), screen and (max-height: 514px) and (max-width: 740px) and (max-device-width: 1024px) and (max-device-height: 799px) and (orientation: landscape) { /* line 24, ../sass/mobile/_item.scss */ .items-holder .item.grid-item { width: 100%; height: 50px; } } -@media screen and (min-width: 515px) and (max-width: 799px) and (min-height: 741px) and (max-height: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (orientation: landscape) { +@media screen and (min-width: 515px) and (max-width: 799px) and (min-height: 741px) and (max-height: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: landscape), screen and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (max-device-width: 1024px) and (max-device-height: 799px) and (orientation: landscape) { /* line 24, ../sass/mobile/_item.scss */ .items-holder .item.grid-item { width: 100%; @@ -362,11 +362,11 @@ .items-holder .item.grid-item { width: 200px; height: 200px; } } -@media screen and (max-width: 514px) and (max-height: 740px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (max-height: 514px) and (max-width: 740px) and (orientation: landscape) { +@media screen and (max-width: 514px) and (max-height: 740px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (max-height: 514px) and (max-width: 740px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: landscape), screen and (max-height: 514px) and (max-width: 740px) and (max-device-width: 1024px) and (max-device-height: 799px) and (orientation: landscape) { /* line 49, ../sass/mobile/_item.scss */ .items-holder .item.grid-item .icon { display: none; } } -@media screen and (min-width: 515px) and (max-width: 799px) and (min-height: 741px) and (max-height: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (orientation: landscape) { +@media screen and (min-width: 515px) and (max-width: 799px) and (min-height: 741px) and (max-height: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: landscape), screen and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (max-device-width: 1024px) and (max-device-height: 799px) and (orientation: landscape) { /* line 49, ../sass/mobile/_item.scss */ .items-holder .item.grid-item .icon { display: none; } } diff --git a/platform/commonUI/general/res/css/theme-espresso.css b/platform/commonUI/general/res/css/theme-espresso.css index 7f3be73b91..4ee5eb2863 100644 --- a/platform/commonUI/general/res/css/theme-espresso.css +++ b/platform/commonUI/general/res/css/theme-espresso.css @@ -731,7 +731,7 @@ mct-container { * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -@media screen and (max-width: 514px) and (max-height: 740px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (max-height: 514px) and (max-width: 740px) and (orientation: landscape) { +@media screen and (max-width: 514px) and (max-height: 740px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (max-height: 514px) and (max-width: 740px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: landscape), screen and (max-height: 514px) and (max-width: 740px) and (max-device-width: 1024px) and (max-device-height: 799px) and (orientation: landscape) { /* line 26, ../sass/mobile/_layout.scss */ .holder-hide { -moz-transition-duration: 0.2s; @@ -739,7 +739,7 @@ mct-container { -webkit-transition-duration: 0.2s; transition-duration: 0.2s; left: -257px; } } -@media screen and (min-width: 515px) and (max-width: 799px) and (min-height: 741px) and (max-height: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (orientation: landscape) { +@media screen and (min-width: 515px) and (max-width: 799px) and (min-height: 741px) and (max-height: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: landscape), screen and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (max-device-width: 1024px) and (max-device-height: 799px) and (orientation: landscape) { /* line 26, ../sass/mobile/_layout.scss */ .holder-hide { -moz-transition-duration: 0.2s; @@ -748,7 +748,7 @@ mct-container { transition-duration: 0.2s; left: -399.5px; } } -@media screen and (max-width: 514px) and (max-height: 740px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (max-height: 514px) and (max-width: 740px) and (orientation: landscape) { +@media screen and (max-width: 514px) and (max-height: 740px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (max-height: 514px) and (max-width: 740px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: landscape), screen and (max-height: 514px) and (max-width: 740px) and (max-device-width: 1024px) and (max-device-height: 799px) and (orientation: landscape) { /* line 37, ../sass/mobile/_layout.scss */ .holder-show { -moz-transition-duration: 0.2s; @@ -756,7 +756,7 @@ mct-container { -webkit-transition-duration: 0.2s; transition-duration: 0.2s; left: 0px; } } -@media screen and (min-width: 515px) and (max-width: 799px) and (min-height: 741px) and (max-height: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (orientation: landscape) { +@media screen and (min-width: 515px) and (max-width: 799px) and (min-height: 741px) and (max-height: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: landscape), screen and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (max-device-width: 1024px) and (max-device-height: 799px) and (orientation: landscape) { /* line 37, ../sass/mobile/_layout.scss */ .holder-show { -moz-transition-duration: 0.2s; @@ -768,7 +768,7 @@ mct-container { /* line 48, ../sass/mobile/_layout.scss */ .button-show { position: absolute; } - @media screen and (max-width: 514px) and (max-height: 740px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (max-height: 514px) and (max-width: 740px) and (orientation: landscape) { + @media screen and (max-width: 514px) and (max-height: 740px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (max-height: 514px) and (max-width: 740px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: landscape), screen and (max-height: 514px) and (max-width: 740px) and (max-device-width: 1024px) and (max-device-height: 799px) and (orientation: landscape) { /* line 48, ../sass/mobile/_layout.scss */ .button-show { -moz-transition-duration: 0.2s; @@ -776,7 +776,7 @@ mct-container { -webkit-transition-duration: 0.2s; transition-duration: 0.2s; left: 257px; } } - @media screen and (min-width: 515px) and (max-width: 799px) and (min-height: 741px) and (max-height: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (orientation: landscape) { + @media screen and (min-width: 515px) and (max-width: 799px) and (min-height: 741px) and (max-height: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: landscape), screen and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (max-device-width: 1024px) and (max-device-height: 799px) and (orientation: landscape) { /* line 48, ../sass/mobile/_layout.scss */ .button-show { -moz-transition-duration: 0.2s; @@ -792,11 +792,11 @@ mct-container { -o-transition-duration: 0.2s; -webkit-transition-duration: 0.2s; transition-duration: 0.2s; } - @media screen and (max-width: 514px) and (max-height: 740px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (max-height: 514px) and (max-width: 740px) and (orientation: landscape) { + @media screen and (max-width: 514px) and (max-height: 740px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (max-height: 514px) and (max-width: 740px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: landscape), screen and (max-height: 514px) and (max-width: 740px) and (max-device-width: 1024px) and (max-device-height: 799px) and (orientation: landscape) { /* line 60, ../sass/mobile/_layout.scss */ .button-hide { left: 257px; } } - @media screen and (min-width: 515px) and (max-width: 799px) and (min-height: 741px) and (max-height: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (orientation: landscape) { + @media screen and (min-width: 515px) and (max-width: 799px) and (min-height: 741px) and (max-height: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: landscape), screen and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (max-device-width: 1024px) and (max-device-height: 799px) and (orientation: landscape) { /* line 60, ../sass/mobile/_layout.scss */ .button-hide { left: 399.5px; } } @@ -804,11 +804,11 @@ mct-container { /* line 71, ../sass/mobile/_layout.scss */ .object-header-mobile { position: relative; } - @media screen and (max-width: 514px) and (max-height: 740px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (max-height: 514px) and (max-width: 740px) and (orientation: landscape) { + @media screen and (max-width: 514px) and (max-height: 740px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (max-height: 514px) and (max-width: 740px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: landscape), screen and (max-height: 514px) and (max-width: 740px) and (max-device-width: 1024px) and (max-device-height: 799px) and (orientation: landscape) { /* line 71, ../sass/mobile/_layout.scss */ .object-header-mobile { left: 25.7px; } } - @media screen and (min-width: 515px) and (max-width: 799px) and (min-height: 741px) and (max-height: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (orientation: landscape) { + @media screen and (min-width: 515px) and (max-width: 799px) and (min-height: 741px) and (max-height: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: landscape), screen and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (max-device-width: 1024px) and (max-device-height: 799px) and (orientation: landscape) { /* line 71, ../sass/mobile/_layout.scss */ .object-header-mobile { left: 39.95px; } } @@ -821,11 +821,11 @@ mct-container { .mobile-menu-icon { display: none; } } -@media screen and (max-width: 514px) and (max-height: 740px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (max-height: 514px) and (max-width: 740px) and (orientation: landscape) { +@media screen and (max-width: 514px) and (max-height: 740px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (max-height: 514px) and (max-width: 740px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: landscape), screen and (max-height: 514px) and (max-width: 740px) and (max-device-width: 1024px) and (max-device-height: 799px) and (orientation: landscape) { /* line 88, ../sass/mobile/_layout.scss */ .browse-manage { width: 257px; } } -@media screen and (min-width: 515px) and (max-width: 799px) and (min-height: 741px) and (max-height: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (orientation: landscape) { +@media screen and (min-width: 515px) and (max-width: 799px) and (min-height: 741px) and (max-height: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: portrait), screen and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px) and (orientation: landscape), screen and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (max-device-width: 1024px) and (max-device-height: 799px) and (orientation: landscape) { /* line 88, ../sass/mobile/_layout.scss */ .browse-manage { width: 399.5px; } } diff --git a/platform/commonUI/general/res/sass/mobile/_constants.scss b/platform/commonUI/general/res/sass/mobile/_constants.scss index 7500707a63..afee63e8e5 100644 --- a/platform/commonUI/general/res/sass/mobile/_constants.scss +++ b/platform/commonUI/general/res/sass/mobile/_constants.scss @@ -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; diff --git a/platform/commonUI/general/res/sass/mobile/_mixins.scss b/platform/commonUI/general/res/sass/mobile/_mixins.scss index 58127a0c14..f71edf2c8c 100644 --- a/platform/commonUI/general/res/sass/mobile/_mixins.scss +++ b/platform/commonUI/general/res/sass/mobile/_mixins.scss @@ -23,14 +23,16 @@ // NOTE: Mixins for devices @mixin phone { @media #{$phoneWidth}, - #{$phoneHeight} { + #{$phoneHeight}, + #{$phoneHeightEmu}{ @content } } @mixin tablet { @media #{$tabletWidth}, - #{$tabletHeight} { + #{$tabletHeight}, + #{$tabletHeightEmu}{ @content } }