ArnsteinW
-
Posts
0 -
Joined
-
Last visited
Reputation Activity
-
ArnsteinW reacted to jcdickinson in Export Artboards as SVG Symbols (Sprite/Icon Sheets)
This would be a great feature for people using Affinity to create SVG web icons. SVG supports symbols, which are basically re-usable bits of SVG. For example, given this SVG file:
<svg xmlns="http://www.w3.org/2000/svg"> <symbol id="artboard1" width="10" height="10" viewBox="0 0 10 10"> <circle cx="5" cy="5" r="5" /> </symbol> </svg> You can use it in a page as follows:
<a class="button"> <svg class="icon"><use href="/images/icons.svg#artboard1" /></svg> <span class="text">A button with a circle.</span> </a> Currently, Affinity exports artboards as transparent rects with an id when exporting an entire document. It would be awesome if we could instruct it to export it artboards as SVG symbols (like the first example), effectively turning Affinity Designer into an end-to-end sprite/icon sheet editor.
Bonus feature: an option to export artboard names (outside the symbol element, positioned near it), so that the same sprite/icon sheet can be used for documentation (example: font-awesome).
-
ArnsteinW reacted to Alces in Improved SVG Exports for Web Design
Currently I still need to use Adobe Illustrator to get decent svg code export to use in my web projects, but it would be awesome if Affinity Designer could do that well too.
An option to export clean svg files with xml code designed to be easy to put in inline html text (making it so I have a lot of flexibility to animate it) would be awesome! Currently Affinity SVG exports are messy and difficult to work with, so I end up using Adobe Illustrator exports which produce much simpler xml code that is much easier to work with on web design animation projects.
-
ArnsteinW reacted to thisleenoble in Export to SVG sprite
I am adding support for SVG sprites to one of my website frameworks. I'm loving the fact that in AD I can export all the individual icons as SVG in situ from the designs supplied, rather than having to assemble them in their own separate document. Being able to select each layer, create a slice and then adjust that slice's dimensions if I need to is fantastic.
The end result is I get a lot of separate SVG icons.
Then I expended a lot of energy installing Node, Grunt, SVGO, you name it in order to do the following:
Optimise the SVG files Create an SVG sprite Copy all the individual icons into the sprite as symbols I realised it would have been SO much easier if AD (or AP) offered the ability to export selected slices as a sprite. I thought that might be what the Continuous checkbox did, but alas, no.
For reference, my starting point for this was this page: https://24ways.org/2014/an-overview-of-svg-sprite-creation-techniques/, the section beginning HTML INLINE SVG SPRITES (specifically the latter section dealing with external sprite.
It would also be advantageous to me if the style="fill:#HEXCOL" could optionally be dropped on each element on export as it prevents styling the elements with CSS.
Thanks for making a great app even greater.
