react-native-svg-parser icon indicating copy to clipboard operation
react-native-svg-parser copied to clipboard

Linear gradient support

Open aks1994 opened this issue 7 years ago • 0 comments

Hi, thanks for making this library. One question I have is how do I use linear gradients in SVGs?

For example, in my svg object I have something like this:

<defs>
    <linearGradient id="mygradient">
      <stop offset="0" class="start-color"/>
      <stop offset="1" class="end-color"/>
    </linearGradient>
</defs>

and then in my css I would like to access it as follows: svg rect {fill: url(#mygradient);}

Currently the css styles are not able to access the mygradient property. Is there any workaround using this library for accessing definitions from ?

Thanks

aks1994 avatar Oct 02 '18 06:10 aks1994