We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
linearGradient
I have this simple SVG element with a gradient.
<svg viewBox="0 0 10 10"> <defs> <linearGradient id="myGradient" gradientTransform="rotate(90)"> <stop offset="5%" stop-color="gold" /> <stop offset="95%" stop-color="red" /> </linearGradient> </defs> <circle cx="5" cy="5" r="4" fill="url('#myGradient')" /> </svg>
When rendered, the svg element itself gets rendered but the gradient isn't applied.
svg
When I edit the element straight from browser, the gradient is applied after render engine updates DOM.
When I checked the compiled template
// ... attr: { "cx": "5", "cy": "5", "r": "4", "fill": "url('#myGradient')" }, // ...
the fill key has #myGradient in quotes. Could this be a problem, maybe?
fill
#myGradient
I created the SVG using vanilla JS and tested it with and without the quotes and it worked in my environment.
Any thought?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have this simple SVG element with a gradient.
When rendered, the
svg
element itself gets rendered but the gradient isn't applied.Gradient isn't applied example
When I edit the element straight from browser, the gradient is applied after render engine updates DOM.
Gradient is applied after changes made to the element using inspection tool example
When I checked the compiled template
the
fill
key has#myGradient
in quotes. Could this be a problem, maybe?I created the SVG using vanilla JS and tested it with and without the quotes and it worked in my environment.
Any thought?
The text was updated successfully, but these errors were encountered: