Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix link colors #554

Merged
merged 1 commit into from
Nov 2, 2021
Merged

Fix link colors #554

merged 1 commit into from
Nov 2, 2021

Conversation

Malvoz
Copy link
Member

@Malvoz Malvoz commented Oct 31, 2021

Fix #553.

Preview

popup-link
legendlink-color

Comment on lines +60 to +75
/* 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;
}
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.

@Malvoz Malvoz merged commit 01f514f into Maps4HTML:main Nov 2, 2021
@Malvoz Malvoz deleted the link-colors branch November 2, 2021 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Link colors are not reverted to UA styles correctly
1 participant