Map color mode preference#5362
Merged
gravitystorm merged 9 commits intoopenstreetmap:masterfrom Dec 11, 2024
Merged
Conversation
hlfan
reviewed
Dec 3, 2024
| @mixin dark-map-color-scheme { | ||
| .leaflet-tile-container .leaflet-tile, | ||
| .mapkey-table-entry td:first-child > * { | ||
| filter: brightness(.8); |
Collaborator
There was a problem hiding this comment.
Doesn't the mentioned step 5 include the need for the filters to be set individually to give the cartographers a choice?
I don't see that as a necessity for this PR, but already setting the filter through a custom property defined on the layer could ease the transition to that being implemented and also act as default and fallback:
here {
filter: var(--dark-mode-map-filter);
}
somewhere else {
.leaflet-layer {
--dark-mode-map-filter: brightness(.8);
}
}
Collaborator
Author
There was a problem hiding this comment.
Step 5 has an impossible requirement of "make it dark but don't pick any filter". The closest possible thing is "don't touch existing filters".
Closed
|
This will only be configurable for logged in users, meaning that non-logged in will still be stuck on the dark UI + dimmed tiles. |
Collaborator
|
Thanks @AntonKhorev , I think this works well. |
Closed
This was referenced Dec 11, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Includes #5339. Implements step 5 from #5324 (comment).