Considering using groups and <use ...> ID references
ryanmcgrath opened this issue · comments
This project is awesome, but one thing you may want to consider is using <g>
groups in a larger hidden SVG tag and then outputting <svg ...><use xlink:href="#id"></svg>
where the SVG should go. As it stands right now it looks like you're outputting the full SVG each time, which ultimately increases the total size on the request. By using the groups you can just shove each SVG in once and go from there - this works for me in my personal projects, and I've not found any browser issues with it (someone can correct me if I'm wrong).
I'm not sure why but I don't see people do this too often, seems overlooked in terms of a good practice. Maybe a configurable option?