3 ms·
This is a cool experiment Though it'd discourage anyone to run off with this idea.. b/c SVGs are unfortunately kinda janky My top 3 issues are: - not even ov
by geokon 1y ago
This is a cool experiment
Though it'd discourage anyone to run off with this idea.. b/c SVGs are unfortunately kinda janky
My top 3 issues are:
- not even overly complicated SVGs, especially with text, will render notably different in different browsers (and renderers like Batik/Inkscape/SalamanderSVG/etc). I have no idea why.. PDFs don't have this issue. While I haven't tried, but I don't think PDFs are as easy to generate programmatically as SVGs
- SVGs have completely broken linking. You can embed an <svg> inside another <svg> to reuse an element - but for some reason it's limited to a link depth of 1! So you can't link an <svg> that links an <svg>. So SVG aren't safely composable - which drives me nuts.. (ex: making a large display panel in SVG that has subcharts)
- Maybe minor.. but tooltips in SVG (which are super handy.. for instance in plots to display additional info about a data point) don't work when the SVG is in an HTML page. They seem to only work when you open SVG in a separate tab.
More abstractly they just have very weird perf issues. Some mildly complex SVGs take GBs of RAM and 1> min to render. But it's unclear which parts are performance sinks.
- Timwi 1y ago> will render notably different in different browsers (and renderers like Batik/Inkscape/SalamanderSVG/etc). I've run into this too, but only with SVG filters, not with basic elements like text, although you do have to make sure that the correct fonts are always available. > tooltips in SVG don't work when the SVG is in an HTML page. They work just fine when the SVG is actually in the HTML. What you're likely talking about is SVG that is referenced by an <img> tag. The latter means that the browser treats it as an image, so yeah, it doesn't have tooltips. Try putting the SVG directly into the HTML. > Some mildly complex SVGs take GBs of RAM and 1> min to render. I have never encountered that in my 10+ years of using SVG.