From 73170726e2e1c6f5dcbb649f82c4a845b9d6e980 Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Mon, 9 Dec 2024 15:54:22 +0300 Subject: [PATCH 1/2] Add map filter css property --- app/assets/stylesheets/common.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index c5e2d14b15..b0b706562d 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -9,6 +9,7 @@ body { font-size: $typeheight; + --dark-mode-map-filter: brightness(.8); } time[title] { @@ -507,7 +508,7 @@ body.small-nav { @include color-mode(dark) { .leaflet-tile-container .leaflet-tile, .mapkey-table-entry td:first-child > * { - filter: brightness(.8); + filter: var(--dark-mode-map-filter); } .leaflet-container .leaflet-control-attribution a { From b87983c2baf55d437c09e668188454d01b5f20b0 Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Mon, 9 Dec 2024 15:51:07 +0300 Subject: [PATCH 2/2] Disable filter inheritance on tiles, apply filter to tile container --- app/assets/stylesheets/common.scss | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index b0b706562d..c1e71cc2d7 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -506,11 +506,15 @@ body.small-nav { } @include color-mode(dark) { - .leaflet-tile-container .leaflet-tile, + .leaflet-tile-container, .mapkey-table-entry td:first-child > * { filter: var(--dark-mode-map-filter); } + .leaflet-tile-container .leaflet-tile { + filter: none; + } + .leaflet-container .leaflet-control-attribution a { color: var(--bs-link-color); }