]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/stylesheets/common.scss
Show map color scheme on user preferences page
[rails.git] / app / assets / stylesheets / common.scss
index 4bedf42b6ac2b6571a7b09d27f2bf11973c6d222..d39535417e1d6868c8f2c7b6b3560568d9feac19 100644 (file)
@@ -502,11 +502,6 @@ body.small-nav {
 }
 
 @include color-mode(dark) {
-  .leaflet-tile-container .leaflet-tile,
-  .mapkey-table-entry td:first-child > * {
-    filter: brightness(.8);
-  }
-
   .leaflet-container .leaflet-control-attribution a {
     color: var(--bs-link-color);
   }
@@ -516,6 +511,23 @@ body.small-nav {
   }
 }
 
+@mixin dark-map-color-scheme {
+  .leaflet-tile-container .leaflet-tile,
+  .mapkey-table-entry td:first-child > * {
+    filter: brightness(.8);
+  }
+}
+
+body[data-map-theme="dark"] {
+  @include dark-map-color-scheme;
+}
+
+@include color-mode(dark) {
+  body:not([data-map-theme]) {
+    @include dark-map-color-scheme;
+  }
+}
+
 /* Rules for attribution text under the main map shown on printouts */
 
 .donate-attr { color: darken($green, 10%) !important; }