pmdesgn Posted October 8, 2014 Share Posted October 8, 2014 Just purchased AD and spent some time test-driving it -- feels nice, intuitive UI. Personally, I was very interested in SVG export for web work and I was happy to see it under the supported formats. Having done a quick test, it certainly worked but I had to edit the SVG file afterwords to get it working 'responsively' (sized via CSS, using percentages). Currently, the SVG is exported with its size determined by the 'width' and 'height' attributes. For example, an object defined as 50x50px object will have width="50" height="50" baked in. By replacing these attributes with viewBox="0 0 50 50", the size can now can be controlled using CSS, e.g., svg { width:100%; } It's an easy manual fix but it would be great to have the option setting available during export.. Web Developer and CiTroNaK 2 Quote Link to comment Share on other sites More sharing options...
Staff MattP Posted October 9, 2014 Staff Share Posted October 9, 2014 Hmm, okay - that's interesting - I don't see why we couldn't do this (at least as an option) so a big thank you for mentioning it! :) Thanks! Matt Web Developer 1 Quote Link to comment Share on other sites More sharing options...
andym Posted October 11, 2014 Share Posted October 11, 2014 There might be cases where you don't want the viewbox to be the same size as the graphic - or you'd want to set the x and y values. I'm wondering whether the the approach should be to let the user control the viewbox prior to export. It would be nice to be able to do that by dragging and resizing the 'viewbox' rather than trial-and-error entering values manually in a text editor. Oh and it would be great to specify how the viewbox should deal with scaling. But I appreciate you have a gazillion other priorities. Quote Link to comment Share on other sites More sharing options...
rodrigopex Posted October 15, 2014 Share Posted October 15, 2014 That would be great. I am using SVG for responsive design and I miss this a lot. You can do kind of that exporting a single layer. Quote Link to comment Share on other sites More sharing options...
lexislav Posted October 20, 2014 Share Posted October 20, 2014 +1 / Vote for this as well. Exporting to SVG for individual slices as another option would be great too. Quote Link to comment Share on other sites More sharing options...
JDW Posted January 14, 2015 Share Posted January 14, 2015 Actually, I use SVGs with SoftPress Freeway (web design app) and find that Illustrator-generated SVGs lack HEIGHT and WIDTH attributes which make the SVGs have problems in Freeway (when used with Freeway's "SVG Image" action). The Illustrator SVGs display in-browser, but the problem is that Freeway auto-creates a fallback image (JPG/GIF/PNG -- your choice) for SVGs and that fallback image isn't generated if the SVGs HEIGHT & WIDTH tags are missing. So I either have to use a text editor to hack in those two tags or bring the SVG into Affinity Designer and then export it (which nicely exports the Height & Width tags). The only problem with using Affinity Designer to do this is that Affinity exports slightly larger SVGs than Illustrator does (yes, I am choosing "Export for Viewing"). Another issue is that I sometimes open an SVG and see whitespace surrounding the vector content. I know I can click the Document setup button in Affinity to shrink the artwork/artboard area to the dimensions of the artwork, but it's fiddly. It would be wonder to have a one-click means of shrinking the artboard to the artwork size. Thanks. Quote Link to comment Share on other sites More sharing options...
Staff MattP Posted January 14, 2015 Staff Share Posted January 14, 2015 Exporting of SVG slices will soon be available, this will resolve your whitespace issues. File size will be optimised in future. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.