<div style="display: flex; flex-wrap: wrap; white-space: pre-wrap; align-items: center; "><img height="20" width="20" style="border-radius:50%; margin-right: 4px;" decoding="async" src="https://avatars.githubusercontent.com/u/50826859?s=20&v=4" /><strong>hlfan</strong> left a comment <a href="https://github.com/openstreetmap/openstreetmap-website/issues/5880#issuecomment-3065908363">(openstreetmap/openstreetmap-website#5880)</a></div>
<p dir="auto">Aha, so it's not really understanding on both sides!</p>
<p dir="auto">I thought you meant manipulations of svg internals inside a helper module, not on invocation.</p>
<blockquote>
<p dir="auto">How is that supposed to work at the same time?</p>
</blockquote>
<p dir="auto">Well, since the <code class="notranslate">fill</code> and <code class="notranslate">stroke</code> attributes can be set on the SVG element itself, overriding <code class="notranslate">:fill => expression</code> when the icon is used (requires another custom transformation for the inline_svg gem) would achieve exactly that.</p>
<div class="highlight highlight-text-html-erb" dir="auto"><pre class="notranslate"><span class="pl-k"><%=</span> inline_svg_tag "changeset/comment.svg", :fill => changeset.comments.empty? ? "none" : "currentColor" <span class="pl-k">%></span><span class="pl-en"></span><span class="pl-s"></span><span class="pl-kos"></span><span class="pl-pds"></span><span class="pl-c1"></span><span class="pl-en"></span><span class="pl-kos"></span><span class="pl-en"></span><span class="pl-kos"></span><span class="pl-en"></span><span class="pl-s"></span><span class="pl-s"></span></pre></div>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/5880#issuecomment-3065908363">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLKOTHSHAOGSGAKXHBL3IFC4RAVCNFSM6AAAAAB2KIRQGKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTANRVHEYDQMZWGM">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLO2OKJMJOJE3OA7F733IFC4RA5CNFSM6AAAAAB2KIRQGKWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTVWXYGIW.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/issues/5880/3065908363</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/5880#issuecomment-3065908363",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/5880#issuecomment-3065908363",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>