Skip to content

SVG Rendering: Default gradient stop offset to 0 when attribute is omitted - #91

Open
IcebreakerAudio wants to merge 1 commit into
VitalAudio:mainfrom
IcebreakerAudio:main
Open

SVG Rendering: Default gradient stop offset to 0 when attribute is omitted#91
IcebreakerAudio wants to merge 1 commit into
VitalAudio:mainfrom
IcebreakerAudio:main

Conversation

@IcebreakerAudio

@IcebreakerAudio IcebreakerAudio commented Jul 8, 2026

Copy link
Copy Markdown

When loading SVG files created in Figma I noticed some gradients were missing. The same SVG files opened fine in JUCE and Chrome.

After some investigation I found that omitting offset="0" on a gradient's first stop was being silently dropped instead of defaulted, collapsing affected gradients to a flat colour. This omitting of the offset seems to be standard (or at least supported in all other tests).

This is a small fix sets the stop offset to 0 when the attribute isn't found.

Omitting offset="0" on a gradient's first <stop> is standard SVG
(most export tools do it), but the stop was being silently dropped
instead of defaulted, collapsing affected gradients to a flat color.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant