I have an SVG object that contains a linear gradient embedded directly in the document. It works fine in Chrome and Firefox, but nothing is displayed in Safari. If I create an SVG as a file and paste it using the Object tag, it works fine in Safari. Other shapes and fills work, it's just a linear gradient that doesn't work. I think I could use an object, but I would prefer to embed SVG directly.
I created a demo here (works in Chrome, not Safari): http://jsfiddle.net/sjKbN/
I came across this answer , which suggests setting the type of content application/xhtml+xml, but this in itself causes other problems.
Just wondering if anyone came across any other fixes or ideas to get this to work.
source
share