openstreetmap / openstreetmap-website

The Rails application that powers OpenStreetMap
https://www.openstreetmap.org/
GNU General Public License v2.0
2.21k stars 918 forks source link

Enable dark mode attribution font color #5338

Closed hlfan closed 4 days ago

hlfan commented 4 days ago

Description

This PR increases the specificity of the dark mode attribution selector. The style was first added in #4764, but didn't overwrite Leaflet's default link selector. That increased specificity fixes #5329's bug report about this by @Nekzuris

before after
image image
AntonKhorev commented 4 days ago

This was supposed to be working already #4764 but something broke it.

AntonKhorev commented 4 days ago

The specificity is the same as in Leaflet css, then it depends on the order but I don't see where we changed the order. It would have been in app/views/layouts/_head.html.erb.

AntonKhorev commented 4 days ago

It's probably Sass's @include color-mode(dark) generating an extra selector in $color-mode-type: data and not generating it in $color-mode-type: media-query, resulting in lower specificity.