Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's always been a curiosity of mine why SVG didn't get more attention from browsers through the years to solve the performance issues. It's open source, cross platform, "dynamic" in a sense AKA no compiling needed, light weight, supports shapes and text, offers immediate responsiveness, etc. Why the lack of love while we pour ever increasing energy into mangling HTML and CSS and every six months a new JS framework/module/whatever to try to make it work?



The problem with SVG 1.1 is, that it doesn't support text wrapping. Text wrapping came with SVG 1.2 Tiny years later, but this standard had been ignored at that time. Then came HTML5.


SVG support is a lot better now but it used to be horrible. A few years ago I wrote a simple game in SVG and it would be broken in almost all mobile browsers at the time.


>>offers immediate responsiveness

does it? Any examples of responsive grid system on SVG? What would be interesting.


I think GP was referring to the fact that you don't need to generate SVG assets at multiple sizes for size/picture clarity balance, as you do with popular raster formats.


But GP was asking : "Why the lack of love while we pour ever increasing energy into mangling HTML and CSS"

SVG can't be, shouldn't be and never will be the replacement for HTML/CSS/JS.


SVG is the replacement for HTML when you're doing something graphical in nature, styling it with css and animating with js. I've always felt that there was a huge potential in SVG for building UI.


But GP's point is the opposite, that HTML/CSS/JS is being used too often for tasks that could be much more simply solved by SVG. I can think of a couple just in my current project.


That's exactly my point. It's seems the task now with Web UI is adapting to screen sizes and capabilities to build complex layouts of components that IMHO HTML/CSS is fundamentally not suited for. The leap from using SVG just for simple elements that scale to entire UIs that scale and shift their layouts doesn't seem to far fetched to me...Oracle, Google, Adobe, Microsoft all use(d) XML with a schema for their layout engines and yet the Web won't (cant?) While it has in its grasp an XML as well?


Cool, could you please explain what are they? To me, personally, SVG is the last resort.


In brief, our product includes a web-based process flow component, typical nodes-and-edges kind of thing. Much better done with SVG IMHO, with first-class support for box & line modelling and styling. But the powers-that-be decreed we'd do it all in HTML & CSS.


nodes-and-edges thing is the classic problem that is perfectly solved by SVG. Other than that it's quite useless though IMHO.


Well, I'll happily agree that SVG is a perfect fit for data-driven graphics, but that represents are reasonably large set of solutions, so I'd not say "useless" at all.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: