Jump to content
Evaluate01

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

Share this post


Link to post
Share on other sites

Hi Jens,

Welcome to the forums :)

As far as I'm aware there is no way to change this I'm afraid.

Thanks

Callum


Please tag me using @ in your reply so I can be sure to respond ASAP.

Share this post


Link to post
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.


Affinity Photo 1.8.4, Affinity Designer 1.8.4, Affinity Publisher 1.8.4;  2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 40GB RAM; macOS 10.15.6
Affinity Photo 
1.8.4.186 & Affinity Designer 1.8.4.4 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 14.0.1

Share this post


Link to post
Share on other sites

Yeah, please scrap the "style" and replace it with XML attributes. That's rather annoying for webdesigners to add "!important" to override inline styling.

And even more annoying to replace them manually

Share this post


Link to post
Share on other sites

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

Please note the Annual Company Closure section in the Terms of Use. These are the Terms of Use you will be asked to agree to if you join the forum. | 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.