@AntonKhorev commented on this pull request.
> +MARKER_COLORS = {
+ :red => "#f6110a",
+ :green => "#9cef11",
+ :blue => "#0b8ef1"
+}.freeze
Why not css properties? That's where I'd expect to find color definitions.
You can put something like this in `common.scss`:
```css
:root {
--marker-red: #f6110a;
--marker-green: #9cef11;
--marker-blue: #0b8ef1;
}
```
Then you can reference them like this: `color="var(--marker-green)"`.
You won't need an initializer, and you probably won't need embed anything into
js like `<%= MARKER_COLORS.to_json %>`.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5854#pullrequestreview-3033939316
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/5854/review/3033939...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev