Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions src/mapml.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,6 @@
font-size: 12px;
}

/* Remove opinionated color of links. */
.leaflet-container a,
.leaflet-container a.leaflet-popup-close-button,
.leaflet-container a.leaflet-popup-close-button:hover {
color: initial;
}

/*
* Controls.
*/
Expand All @@ -63,6 +56,23 @@
-moz-appearance: none;
appearance: none;
}

/* Remove opinionated link colors set by Leaflet. */
.leaflet-container a {
color: revert;
}
/* Don't use UA styles for links that are controls
(and don't inherit color from map into the reload button for consistency). */
.mapml-reload-button,
.leaflet-control-container a,
.leaflet-container a.leaflet-popup-close-button,
.leaflet-container a.leaflet-popup-close-button:hover {
color: #000;
}
/* Revert above `color: #000` for legendlinks. */
.mapml-layer-item-name a {
color: revert;
}
Comment on lines +60 to +75
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: We wouldn't need most of these (and in other places where we "fix" Leaflet styles) if we could just edit the source leaflet.css file - in this case to simply remove the opinionated color they apply to links - but that's got its own set of problems I suppose...

Copy link
Member Author

@Malvoz Malvoz Oct 31, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Managing styles would also be simpler if Leaflet just used buttons for buttons, and not links for buttons.

Related issue: #19.


.leaflet-top .leaflet-control {
margin-top: 5px;
Expand Down