Export SVG with artboard boundary, without transform
When you export icons to SVG format, you need artboard to fit the illustrations for clear SVG code. Like Adobe Illustrator.
Now XD adds superfluous information like transform().
Hi,
Can you give us more details about your workflow and how the transform impacts you?
Cheers,
M.
-
Christoph Mauerhofer commented
I have this problem too. I have icons which consist of a group of one path and one transparent rectangle (square) shape in the background, so that all icons keep their square 24x24 pixels dimensions after exporting. I have multiple of these icons on one artboard (as part of a mockup) and I want to export them as SVG assets.
If e.g. an icon is placed on pixel position 50, 75 on the artboard, in the exported SVG the path and the rect elements would receive a transform: translate(50, 75) property and then the group around both elements would have a transform: translate(-50, -75) property. Of course these two cancel each other out so that the path and rect are really placed at position (0, 0) inside the exported SVG. But the two transforms are therefore redundant and should really all be removed. -
Fritz Green commented
All the transforms bloat the code and resulting files, cause issues with animations, and make the code unnecessarily difficult to modify by hand. For us, unusable, forcing us to take the artwork back into Illustrator for export. PLEASE fix this.
-
Thomas Deinhamer commented
As a developer I want to have SVG files as small and cleaned up as possible. Superfluous transforms make it impossible to work with the SVG in development (adding animations, etc.). Also the transforms bloat the SVG size unnecessarily.
There should absolutely be an export option to remove transforms (and recalculate path coordinates based on the transforms) so the exported files are as optimized and clean and small as possible.
These are related:
* https://adobexd.uservoice.com/forums/353007-adobe-xd-feature-requests/suggestions/37451392-svg-should-not-transform-translate
* https://adobexd.uservoice.com/forums/353007-adobe-xd-feature-requests/suggestions/15616317-save-svg-icons-without-transform-at-root-level -
Anonymous commented
For a developer this is an issue. Is there any solution?
-
Anonymous commented
There are still the issues continue in the XD for export the SVG .
-
Adam M Babkes commented
This is a nightmare for me as well. We use a lot of SVGs with inline CSS and the resulting code for this is impossible to "fix" - so we have to work around by "re-opening" the SVGs in Illustrator to export clean SVG code.
-
Wiredframe commented
My dev colleagues really don't like the exported SVGs. This Transform thing makes it unsuable and width and height properties are completely missing!