You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could you please share the configuration you used to produce this output? I'm unable to reproduce that behavior using the default preset with SVGO v3.0.2 or v3.0.3
Generally speaking, you'd probably want to use fill="currentcolor" for this use-case though rather than add a class attribute.
By doing this, it defaults to black, and inherits the foreground color of its parent. In HTML, this would be the color style of the parent node. This is a much better way to handle colors in SVGs, and is what icon fonts like Font Awesome do.
I've got a problem with an SVG:
I set a
class="color"
to be able to change the color via css later on.After optimizing the class is missing:
Other attributes have moved to the
path
, but not the class.I'm not able to find an option/plugin to avoid that.
It does work as expected if the original SVG looks like this (class in
path
):will result in:
Is there a way to keep the class attribute independent on its position?
The text was updated successfully, but these errors were encountered: