divstivs Posted July 15, 2016 Share Posted July 15, 2016 Hullo I was wondering is there a way in Affinity Designer to export CSS classes for different SVG elements? I'm editing a political map and different regions are coloured according to voting. It would be handy to have each similar region under the same class when I come to add interactivity... I mean, I got around this by opening the SVG in Illustrator and exporting once again with <Style Elements>. But it would be handy if there's a way to do it in Designer. Quote Link to comment Share on other sites More sharing options...
Staff Leigh Posted July 26, 2016 Staff Share Posted July 26, 2016 Welcome to the forum divstivs :D Affinity Designer currently only supports inline styles in SVG Files. I'm sure the ability to have a style element instead will be added in the future :) Quote Link to comment Share on other sites More sharing options...
saivan Posted December 21, 2017 Share Posted December 21, 2017 This is a very important feature that is really making affinity harder and harder to use. Please add the ability to apply classes and simple interactivity to svgs, you'd literally just have to give users the ability to add attributes to particular elements, and export them verbatim. This would make designer much more useful on the web: I am finding myself "fighting" the design choices made by your devs all the time, and this is making it much harder to use affinity in a production environment. If I have a button, I want the user to hover over it to change the colour, and I'd like to do that without making a swathe of changes after I've exported the SVG, because if I need to make a change in designer; I have to go ahead and make all of those changes again! Common use case ============== I have a ball image that I've used throughout my svg and I'd like it to change colours when I click on it. I'd also like to select all of the balls, so I can hide all of them whenever I like. Current solution: - Name all my balls - ball, ball1, ball2, .... - Select everything that matches ball(n) Better solution: - Apply a class to all balls like .ball - Select .ball and apply the style Its much more useful for people using affinity on the web. 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.