Jump to content

SVG no precedence of overwriting attributes via style attribute declarations


Recommended Posts

These are Affinity SVG parsing/interpretation bugs, since according to the SVG spec, a style attribute prevails ...

Quote

SVG style attribute

The SVG element style attribute works in any SVG tag. When overriding attributes in the style attribute with CSS, the CSS property in the style attribute prevails.

<rect style="fill: beige" fill="aliceblue" width="300" height="100" />

The element is filled with beige because the declarations in the style attribute take precedence over the fill attribute. Just as with HTML elements, a style attribute sits closer to the element than a class—so style also prevails over global CSS declarations.

In Affinity however the above defined SVG rectangle will be always shown in aliceblue instead of beige, since the precedence over the fill attribute never takes place! - This probably affects all Affinity platform versions!

See related and for more informations this thread here ...

 

☛ Affinity Designer 1.10.5 ◆ Affinity Photo 1.10.5 ◆ OSX El Capitan

Link to comment
Share on other sites

  • Moderators

This will be due to our importer not reading the included style sheet with the SVG file, this is logged with our developers to investigate.

Link to comment
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...
 Share

×
×
  • Create New...

Important Information

Please note there is currently a delay in replying to some post. See pinned thread in the Questions forum. 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.