]> git.openstreetmap.org Git - rails.git/commitdiff
Adapt Leaflet scale and attribution controls to dark mode
authorAnton Khorev <tony29@yandex.ru>
Tue, 7 May 2024 13:55:37 +0000 (16:55 +0300)
committerAnton Khorev <tony29@yandex.ru>
Wed, 8 May 2024 11:08:17 +0000 (14:08 +0300)
app/assets/stylesheets/common.scss

index 53a60a3b2c862bc0c3313f11605651499b5c4370..3c75a67661f2fba4265f8f9c40852b0b5f62a760 100644 (file)
@@ -457,13 +457,17 @@ body.small-nav {
   border-top: 0px !important;
 }
 
-.leaflet-popup-content-wrapper,
-.leaflet-popup-tip,
-.leaflet-contextmenu,
-.leaflet-contextmenu-item {
+.leaflet-popup-content-wrapper, .leaflet-popup-tip,
+.leaflet-contextmenu, .leaflet-contextmenu-item,
+.leaflet-control-attribution, .leaflet-control-scale-line {
   @extend .bg-body, .text-body;
 }
 
+.leaflet-control-attribution, .leaflet-control-scale-line {
+  @extend .bg-opacity-75;
+  text-shadow: none !important;
+}
+
 .leaflet-contextmenu-item.over {
   @extend .bg-body-secondary, .border-secondary, .border-opacity-10;
 }
@@ -481,6 +485,10 @@ body.small-nav {
   .mapkey-table-entry td:first-child > * {
     filter: brightness(.8);
   }
+
+  .leaflet-control-attribution a {
+    color: var(--bs-link-color);
+  }
 }
 
 /* Rules for attribution text under the main map shown on printouts */