Closed vomc closed 1 year ago
Closing this as I found a solution which is to not use hsl colors, this seems to work
<svg width="300" height="30" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient id="a" x1="1" x2="0" y1="0" y2="0">
<stop offset="0%" stop-color="black"/>
<stop offset="50%" stop-color="#0af"/>
<stop offset="100%" stop-color="white"/>
</linearGradient>
</defs>
<path fill="url(#a)" d="M0 0h300v30H0z"/></svg>
Hi,
I am not sure what I am doing wrong so any advice is appreciated. When I add an SVG with a linear gradient defined like the below to a PDF I just get black backgrounds. Adding something like
fill="red"
of course works. Is it that the gradient is not computed correctly or is it thatfill
does not support theurl(#foo)
syntax?