3 ms·
I love SVG, my current gripes are: 1. Patchy support. If you stick to the most common parts of the spec its ok, but there is no comprehensive test suite, and o
by justincormack 15y ago
I love SVG, my current gripes are:
1. Patchy support. If you stick to the most common parts of the spec its ok, but there is no comprehensive test suite, and only Microsoft seems to be interested in test coverage. Import stuff that Inkscape can render to a browser and you may get issues. Opera is better than Firefox and Webkit.
2. No CSS transitions on SVG properties, so it is back to Javascript for animation.
3. No support in Android 2.x. Or WebOS.
4. Server side rendering of a fallback image (especially if you use css styling) is a pain. Maybe there are good solutions I havent found yet.
5. It is a big spec, I feel that some better learning resources would help.
Do love it though...
- taybenlor 15y agoYou can animate SVG without JS. http://en.wikipedia.org/wiki/SVG_animation http://en.wikipedia.org/wiki/SVG_animation CSS3 has similarly patchy support. I think the worst thing about SVG is the lack of resources.
- justincormack 15y agoOK I admit I never tried SMIL, but I believe the browser support is terrible. The CSS support works in principle, but in fact almost none of the SVG properties can be transitioned in any current browser. I think some of the shared properties like color can be though, but I couldn't get anything useful to work without javascript (and d3.js has nice javascript transition support...)
- masklinn 15y ago> Patchy support. This. And on basic stuff too, especially in Webkit: flexible canvas size is broken (fantastic for a vector format), events handling is bonkers, looks vary drastically from one browser to the next, all methods of serving an SVG are shitty in different ways (and forget about using an SVG background, not going to happen), etc... Tried to make a basic interactive SVG map (not much interaction too, big rectangular active surfaces), ended up scrapping everything and going with canvas. It looks like either nobody gives a shit about SVG on the browser side or the spec is either retarded or not implementable.
- justincormack 15y agoIts not that bad. Maps are fine cross browser in my experience, eg look at: http://mbostock.github.com/d3/ex/choropleth.html http://mbostock.github.com/d3/ex/choropleth.html http://ie.microsoft.com/testdrive/Graphics/AtlaszurEuropawahl/Default.xhtml http://ie.microsoft.com/testdrive/Graphics/AtlaszurEuropawah... Funny you mention flexible canvas size, just looking at trying to do that right now....
- Geee 15y agoHow about using SVG with raphael.js? I'm not very familiar with it, but I think it solves many of these problems.
- justincormack 15y agoStill Javascript transitions only, its better supported only because it is a small subset of SVG which is known to work. And it has other issues, like the Raphael commands are a separate language, and then the DOM will be different. For some basic use cases it is a good way to use SVG that gives you IE support (but not eg Android 2.x). It is not a complete answer... also you get to like SVG when you start using it, being able to directly browse the DOM is great, with Raphael it is indirected through a translation layer.