From c29cdf378f30f5e0ea55b548f90405a2bcdc1fec Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Tue, 7 May 2024 16:55:37 +0300 Subject: [PATCH] Adapt Leaflet scale and attribution controls to dark mode --- app/assets/stylesheets/common.scss | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index 53a60a3b2..3c75a6766 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -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 */ -- 2.39.5