[openstreetmap/openstreetmap-website] Forward preferred color scheme to id-container (PR #6323)
Martin Raifer
notifications at github.com
Fri Sep 19 13:49:32 UTC 2025
@tyrasd commented on this pull request.
> + data[:theme] = (preferred_color_scheme(:site) if preferred_color_scheme(:site) != "auto")
data[:asset_map] = assets("iD").to_json %>
<%= tag.div "", :id => "id-container", :data => data %>
@hlfan I think for this work as expected with the latest version on iD (after [6e585016](https://github.com/openstreetmap/iD/pull/11308/commits/6e5850160d8ed6292bc9b705daec1a5458616e8d)), this would need to be changed to set the css `class`, instead of setting the theme in a `data` attribute:
```suggestion
<%= tag.div "", :id => "id-container", :data => data, :class => ("theme-" + preferred_color_scheme(:site) if preferred_color_scheme(:site) != "auto") %>
```
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6323#pullrequestreview-3244964516
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6323/review/3244964516 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250919/63444875/attachment-0001.htm>
More information about the rails-dev
mailing list