Hacker News new | ask | show | jobs
by Pxtl 2635 days ago
Things like this convince me more and more that SVG is overdesigned and solving the wrong problem:

The world needed a vector version of PNG far more than it needed a vector version of HTML/CSS.

4 comments

W3C is creating a subset of SVG called "SVG Native". It is intended for icons and simple graphics, so it won't have support for text, scripts, links or XSL processing. Also, use of CSS or animations isn't recommended. It will be similar to SVG in OpenType fonts: https://docs.microsoft.com/en-us/typography/opentype/spec/sv...
Neat. Hopefully it gets adopted. And hopefully it uses its own file-extension so I can actually tell them apart - I'd love to have, like ".svgn" for native svg.
Wasn't there already "SVG Tiny" for this purpose? I recall it being used on mobile a long time ago, like circa 2005.
Another subset to join the ones already being used by UWP, Android and iOS. Oh well, xkcd comes to mind.
I will push back a bit and say SVG's integration with HTML documents is very convenient and useful. I think it has been held back by poor implementation, particularly Mozilla's.

The SMIL stuff has made the SVG DOM a bloody mess, and it's deprecated everywhere, which is a sad outcome, but it's still useful.

That makes no sense. SVG _is_ the vector equivalent of PNG. Just because it's defined in an xml namespace that can be directly embedded in html, doesn't mean it is somehow bound to it.
I can't write JavaScript inside of a PNG. I can't reference external resources inside of a PNG. I can't reference CSS classes inside of a PNG. I can't animate a PNG. A PNG is a simple, dumb, uncomplicated file with a minimal surface area for vulnerabilities.
Definitively, this.