From: Tom Hughes Date: Tue, 30 Apr 2024 17:58:42 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/pull/4735' X-Git-Tag: live~718 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/2058251659125dcc5ddd5f55d1a434e060b5931a?ds=inline;hp=-c Merge remote-tracking branch 'upstream/pull/4735' --- 2058251659125dcc5ddd5f55d1a434e060b5931a diff --combined app/assets/stylesheets/common.scss index 84d78814b,eba3df61b..17d20c812 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@@ -1,4 -1,6 +1,6 @@@ + @use "sass:map"; @import "parameters"; + @import "browse"; @import "bootstrap"; @import "rails_bootstrap_forms"; @@@ -474,13 -476,6 +476,13 @@@ body.small-nav } } +@include color-mode(dark) { + .leaflet-tile-container, + .mapkey-table-entry td:first-child > * { + filter: brightness(.8); + } +} + /* Rules for attribution text under the main map shown on printouts */ .donate-attr { color: darken($green, 10%) !important; } @@@ -1017,4 -1012,32 +1019,32 @@@ img.trace_image } } - @import 'browse'; + /* Rules for map sidebar icons */ + + .browse-section { + .node::before, + .way::before, + .relation::before { + display: inline-block; + width: 25px; + margin-left: -25px; + } + + .node, .way, .relation { + margin-left: 25px; + } + } + + @each $class, $item in $map-sidebar-icons { + .browse-section #{$class}::before { + content: image-url('browse/#{map.get($item, "filename")}'); + } + + @if map.get($item, "invert") { + @include color-mode(dark) { + .browse-section #{$class}::before { + filter: invert(.8) hue-rotate(180deg); + } + } + } + }