Closed gethinoakes closed 6 years ago
do you think this would be viable
Yes, but it would be more so along the lines of a lifecycle hook that I suggested in another issue. I'll try to get around to adding that soon.
Great, I did see that and thought it could also work for this. Thanks for the quick response.
Added [onSVGLoaded]
in v6.2.0, which you can use to manipulate the SVG element prior to it being inserted.
(Note that it doesn't work with symbols currently)
If you use multiple SVG icons on the same page that have been exported from applications such as Adobe XD/Illustrator, their styles end up conflicting with each other.
One way around this is to go into each SVG's code and add a prefix to each style. I was wondering if that could be done with this library? Some property such as
prefixClass
perhaps?I'll try and have a look at your code when I have more time, but do you think this would be viable as the creator?