In my app I load different SVG files and need to zoom them. As I see it I need to apply a transformation matrix to an element to have it zoomed, but this doesn't work on SVG element, so I need to wrap everything in a <g> and transform it instead.
So my question is is it safe to do this? Is it allowed for elements like <defs> be not immediate children of <svg>? Will the transformation on outermost <g> affect the elements inside <defs> in this case? What other issues may arise if I wrap everything in a <g>?