mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-09 04:25:38 +00:00
Bug 619019 - Use -moz-device-orientation when needed [r=mbrubeck]
This commit is contained in:
parent
5a714fdd36
commit
fc38d3fc56
@ -167,7 +167,13 @@ let Util = {
|
||||
},
|
||||
|
||||
isPortrait: function isPortrait() {
|
||||
return (window.innerWidth < 500);
|
||||
#ifdef MOZ_PLATFORM_MAEMO
|
||||
return (screen.width <= screen.height);
|
||||
#elifdef ANDROID
|
||||
return (screen.width <= screen.height);
|
||||
#else
|
||||
return (window.innerWidth <= window.innerHeight);
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -35,6 +35,14 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
%ifdef MOZ_PLATFORM_MAEMO
|
||||
%define ORIENTATION -moz-device-orientation
|
||||
%elifdef ANDROID
|
||||
%define ORIENTATION -moz-device-orientation
|
||||
%else
|
||||
%define ORIENTATION orientation
|
||||
%endif
|
||||
|
||||
/* main toolbar (URL bar) -------------------------------------------------- */
|
||||
#toolbar-main {
|
||||
-moz-appearance: none;
|
||||
@ -456,14 +464,14 @@ toolbarbutton.choice-remotetabs {
|
||||
}
|
||||
|
||||
/* addons panel UI ------------------------------------------------------- */
|
||||
@media (min-width: 500px) {
|
||||
%expand @media (__ORIENTATION__: landscape) {
|
||||
#addons-repo {
|
||||
-moz-box-orient: horizontal;
|
||||
-moz-box-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 499px) {
|
||||
%expand @media (__ORIENTATION__: portrait) {
|
||||
#addons-repo {
|
||||
-moz-box-orient: vertical;
|
||||
-moz-box-pack: center;
|
||||
@ -1207,7 +1215,7 @@ pageaction:not([image]) > hbox >.pageaction-image {
|
||||
}
|
||||
|
||||
/* Put setting textboxes on a separate row in portrait */
|
||||
@media (max-width: 499px) {
|
||||
%expand @media (__ORIENTATION__: portrait) {
|
||||
.setting-integer,
|
||||
.setting-string {
|
||||
-moz-box-align: start;
|
||||
|
Loading…
x
Reference in New Issue
Block a user