Jump to content
You must now use your email address to sign in [click for more info] ×

SVG Export: stroke and fill instead of style?


Recommended Posts

Hi, I'm evaluating AD for creating SVG files in a specific format, required by an internal software.

What I see so far in the exported SVG is ok. But instead of getting the formatting in the style attribute

<rect id=":24W16" x="261.857" y="244.422" width="26.47" height="30.95" style="fill:#c4d8f9;"/>

I would prefer to get stroke and fill like this (result of another software with it's own quirks)

<rect x="259" y="214" width="32.5" height="38" transform="matrix(1,0,0,1,0,0)" id=":24W16" fill="rgb(196,216,249)"/>

Any export options that allow for this that I haven't found yet?

 

Background: the SVG will be loaded into a HTML page and custom CSS will get applied to the SVG. The inline style in the SVG has highest priority and overrules what's in the CSS.
Yes, there is a workaround by making everything in the CSS !important but that is a dirty hack that I'd like to avoid.

Affinity Designer is the last in a long list of vector editors I'm trying, saving as SVG seems always a bad compromise, sigh :-(

 

Regards,
Jens

Link to comment
Share on other sites

Not that it will make your search for the perfect generator any easier, but you might find this interview with Jon Ferraiolo of interest, particularly his answer to the "Why is the SVG spec so enormous?" question.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

  • 3 months later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.