From: Andy Allan Date: Wed, 15 Apr 2020 14:50:12 +0000 (+0200) Subject: Merge pull request #2547 from bezdna/mobile-layout X-Git-Tag: live~3491 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/92ca4069957666065194e0b63de5b46261b8a21d?hp=0dffed7a05de48da72c8a9d412ade7bae1032242 Merge pull request #2547 from bezdna/mobile-layout Trigger small screen layout based on the width of the screen, rather than the width of the menus. --- diff --git a/app/assets/stylesheets/small.scss b/app/assets/stylesheets/small.scss index e5634e11d..83b112ce7 100644 --- a/app/assets/stylesheets/small.scss +++ b/app/assets/stylesheets/small.scss @@ -91,34 +91,7 @@ body.small { .compact-hide { display: inline-block; } - - &.map-layout { - #sidebar, #map { - position: relative; - overflow-x: hidden; - width: 100%; - height: 50%; - } - - .overlay-sidebar { - #sidebar { - position: absolute; - width: 300px; - height: auto; - overflow: hidden; - } - - #map { - height: 100%; - } - } - - #map-ui { - z-index: 9999; - width: 100%; - overflow-y: scroll; - } - } + .overlay-sidebar #sidebar .welcome.visible { display: none; @@ -181,3 +154,33 @@ body.small { } } + +@media (max-width: 767.98px) { + body.map-layout { + #sidebar, #map { + position: relative; + overflow-x: hidden; + width: 100%; + height: 50%; + } + + .overlay-sidebar { + #sidebar { + position: absolute; + width: 300px; + height: auto; + overflow: hidden; + } + + #map { + height: 100%; + } + } + + #map-ui { + z-index: 9999; + width: 100%; + overflow-y: scroll; + } + } +}