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

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.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

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...
×
×
  • 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.