[openstreetmap/openstreetmap-website] Store routing icons separately (PR #6189)

Marwin Hochfelsner notifications at github.com
Sun Jul 13 18:44:58 UTC 2025


@hlfan 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

Some icons in this repo (like [ohm.svg](https://github.com/openstreetmap/openstreetmap-website/blame/master/app/assets/images/social_link_icons/ohm.svg)) say they were exported from Illustrator.
Illustrator has currently [no support](https://illustrator.uservoice.com/forums/601447-illustrator-desktop-bugs/suggestions/42330448-please-allow-fill-currentcolor-to-be-set-for-svg) for currentColor.

But I'm up for removing the transform if this will be checked in the PRs.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6189#discussion_r2203490637
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/6189/review/3014279109 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250713/60094737/attachment.htm>


More information about the rails-dev mailing list