]> git.openstreetmap.org Git - rails.git/commitdiff
Show sidebar in print media
authorAnton Khorev <tony29@yandex.ru>
Fri, 18 Aug 2023 14:32:50 +0000 (17:32 +0300)
committerAnton Khorev <tony29@yandex.ru>
Fri, 18 Aug 2023 15:06:56 +0000 (18:06 +0300)
app/assets/stylesheets/print.scss

index 71fdf3978086dab10841e66ca4cb40615ed05810..a4afdf576e7e7261956fcd00345ac491bd432db2 100644 (file)
@@ -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;