Hacker News new | past | comments | ask | show | jobs | submit login

I love that people are rediscovering SVG

I hope this gathers stream and forces Google (and others, but especially Google) to fix the bugs they have in the format




I love that SVG survived! It dates back to 1999 and was almost forgotten. When D3js first got started around 2010/2011 I was astonished that SVG support was so good in so many browsers; Mike had been using it even earlier with Protovis and Polymaps. Everything but IE had support as some sort of unnused vestigal thing. And then interactive visualizations started using SVG regularly and now it's vital again.


I wish they had implemented gradients in a way that didn't depend on uri fragments. Not an issue with standalone svg images, but it means you have to manage namespace clashes for inline svg images.


I wish that CSS could be applied to them consistently.


It mostly can, outside of browser bugs anyhow.

The browser bugs are a big complication however


Could you elaborate on the bugs in SVG? Are there any usability issues beyond the bugs? I tried some cursory googling 'why not to use svg', 'svg bugs', etc and didn't really find any common/recurring.


Historically, the SVG-related systems in most browsers haven't seen a lot of love, so it's lagged behind other web technologies. This seems to be getting better — I know Safari just landed a nice 3x performance improvement to one of the SVG filters.

Here's a handful of issues that I still encounter, due to cross-browser differences.

  * You can't use the full range of CSS3 colors.
  * You can't set certain style properties via CSS (requiring the use of attributes).
  * You can't use self-closing tags for certain elements.
  * Differing behaviour when you set an attribute to "null" (which is fine, it's just a gotcha)
SVG performance also varies wildly, more so than JS perf, HTML DOM perf, or CSS perf. This seems to correlate with the visual quality of the rendered result — Chrome is the fastest but has excessive smoothing, poor sampling of scaled images, etc; Safari is the slowest but produces the cleanest result.


I mentioned the issue with gradients in another comment. There's also a good presentation here on other issues: http://slides.com/sarasoueidan/tips-for-avoiding-common-svg-...

Perhaps not all "bugs", but unexpected anyway.


One of the most annoying bugs is Chrome’s utterly broken implementation of the Use element for SVG.

That’s one of many, but it’s one they’ve know about for years.


SVG is making a monster come back... and we absolutely need Gmail to get onboard.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: