Add support for viewBox svg field
djsegal opened this issue · 4 comments
That and fill
are two of the svg fields that are currently not supported. Is there a reason for this?
@djsegal thanks for opening this issue. I'm not sure exactly what you're asking for… What would you like this gem to do that it doesn't already? (Examples are appreciated)
Hi @jamesmartin, I think @djsegal suggested adding two more options to inline_svg_tag
to support svg attributes: fill
and viewBox
Example:
inline_svg_tag 'example.svg', fill: 'currentColor', view_box: '0 0 100 100'
would be
<svg fill="currentColor" viewBox="0 0 100 100">
...
</svg>
Thanks for clarifying, @euxx. ✨
I'll keep this open to track interest in this feature. For now, it should be possible for people that want this behavior to implement it themselves using a custom transformation.
Yeah, custom transformation
should be enough for now.
Thanks for this convenient gem~