From: Andy Allan Date: Wed, 27 Sep 2023 14:10:52 +0000 (+0100) Subject: Merge pull request #4184 from AntonKhorev/print X-Git-Tag: live~542 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/228ab23ce16338e281e609d9355c982cd4085c42?hp=e8af4b85bf001ade543d03a503c769055d42e6a2 Merge pull request #4184 from AntonKhorev/print Show sidebar in print media --- diff --git a/app/assets/stylesheets/print.scss b/app/assets/stylesheets/print.scss index 71fdf3978..a4afdf576 100644 --- a/app/assets/stylesheets/print.scss +++ b/app/assets/stylesheets/print.scss @@ -1,30 +1,58 @@ +html { + height: 100%; +} + +body { + height: 100%; + margin: 0; +} + +#content { + height: 100%; +} + header, -#sidebar, -#permalink, .leaflet-control { display: none; } -html { - height: 100%; +.map-layout .overlay-sidebar #sidebar { + display: none; +} + +.map-layout #sidebar { + page-break-after: always; + + & > * { + display: none; + } + #sidebar_content { + display: unset; + } + + button, + input, + textarea, + .secondary-actions { + display: none; + } +} + +#map-ui { + display: none !important; } #map { - position: absolute !important; - top: 0; - bottom: 40px; - left: 0; - right: 0; + position: relative; + height: calc(100% - 40px); + box-sizing: border-box; border: 1px solid black; } /* Rules for attribution text under the main map shown on printouts */ #attribution { - position: absolute !important; - bottom: 0; - left: 0; - right: 0; + page-break-inside: avoid; height: 40px; font-size: 12px; text-align: center;