[openstreetmap/openstreetmap-website] Store routing icons separately (PR #6189)
Anton Khorev
notifications at github.com
Sun Jul 13 15:46:11 UTC 2025
@AntonKhorev commented on this pull request.
> +module OpenStreetMap
+ class SvgCurrentColorTransform < InlineSvg::CustomTransformation
+ def transform(doc)
+ doc.xpath("//@fill|//@stroke").each do |attr|
+ attr.value = "currentColor" if attr.value.strip.downcase == value
+ end
+ doc
+ end
+ end
It's not going to be the actual current color when opened as an external file, but the color seems to be defaulting to black[^1] in everything I opened it with.
[^1]: ["Depends on user agent"](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Attribute/color) via `color` attribute.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6189#discussion_r2203431674
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6189/review/3014202129 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250713/2f527989/attachment.htm>
More information about the rails-dev
mailing list