[openstreetmap/openstreetmap-website] Fix some dark mode colors desyncing (PR #6576)
Andy Allan
notifications at github.com
Wed Dec 3 18:24:40 UTC 2025
@gravitystorm requested changes on this pull request.
> @@ -177,7 +177,7 @@ class ContextMenu {
}
_render(items) {
- const $menuList = $("<ul>").addClass("dropdown-menu show shadow cm_dropdown_menu");
+ const $menuList = $("<ul>").addClass("dropdown-menu list-group show shadow cm_dropdown_menu");
I don't think it's a good idea to try to make this styled as *both* a dropdown menu and also as a list-group. It shouldn't be both, these are two different bootstrap components.
```diff
- const $menuList = $("<ul>").addClass("dropdown-menu list-group show shadow cm_dropdown_menu");
+ const $menuList = $("<ul>").addClass("dropdown-menu show shadow cm_dropdown_menu");
```
> }
/* Rules for contextmenu */
#map-context-menu {
.dropdown-item {
&:hover, &:active {
- background-color: $gray-200;
+ @extend :focus;
How about we just don't override the hover and active states at all, and let bootstrap deal with them? If we leave it alone, it works fine in both dark and light modes, as far as I can tell.
```diff
#map-context-menu {
- .dropdown-item {
- &:hover, &:active {
- @extend :focus;
- }
- }
&.cm_dropdown {
```
> @@ -194,7 +194,7 @@ class ContextMenu {
const $label = $("<span>").text(item.text);
const $link = $("<a>")
- .addClass("dropdown-item d-flex align-items-center gap-3")
+ .addClass("dropdown-item list-group-item-action d-flex align-items-center gap-3")
```diff
- .addClass("dropdown-item list-group-item-action d-flex align-items-center gap-3")
+ .addClass("dropdown-item d-flex align-items-center gap-3")
```
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6576#pullrequestreview-3536348465
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6576/review/3536348465 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20251203/ed24c382/attachment.htm>
More information about the rails-dev
mailing list