FWeinb / grunt-svgstore

Merge svgs from a folder
MIT License
920 stars 94 forks source link

Gradients in Firefox #49

Closed rctneil closed 10 years ago

rctneil commented 10 years ago

I'm having the same issue as to what is described here: http://stackoverflow.com/questions/12867704/svg-linear-gradient-does-not-work-in-firefox

Is there a way SVGStore can help fix this?

FWeinb commented 10 years ago

You have to hide the SVG using a different technique than with display:none. Something like:

position: absolute;
width:0;
height:0;
rctneil commented 10 years ago

That worked to enable the gradients in Chrome but still fails in Firefox.

FWeinb commented 10 years ago

Sorry than I don't have an idea

rctneil commented 10 years ago

That SO answer stated that "In Firefox gradients and patterns don't work if they are within a symbol. To workaround this simply move the gradient definition outside the symbol element."

Couldn't grunt-svgstore do this as part of it's tasks?

rctneil commented 10 years ago

@FWeinb Any thoughts on this at all?

FWeinb commented 10 years ago

It would be interesting to look into the spec to verify if this is the intended behaviour. I will move gradients and patterns out of the symbol tag.

rctneil commented 10 years ago

@FWeinb Do you have any thoughts on when this may be implemented along with https://github.com/FWeinb/grunt-svgstore/issues/50 ?

FWeinb commented 10 years ago

Will be in 0.3.2