From d46f9d28ed99474c4529d33a282589d0190a47f6 Mon Sep 17 00:00:00 2001 From: Tim Weber Date: Thu, 14 Nov 2024 22:26:00 +0100 Subject: [PATCH] Use CSS filter instead of dimming tiles Also fixes the issue that the tiles were filtered twice due to inheriting the filter from their parent element. --- app/assets/stylesheets/common.scss | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index c432bd848d..d293a5cbf3 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -504,7 +504,13 @@ body.small-nav { @include color-mode(dark) { .leaflet-tile-container, .mapkey-table-entry td:first-child > * { - filter: brightness(.8); + filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%); + } + + /* Reset filter for everything inside of the tile container, so that it + * doesn't get applied multiple times via inheritance. */ + .leaflet-tile-container * { + filter: none; } .leaflet-control-attribution a {