Hacker News new | ask | show | jobs
by nawgz 1350 days ago
This is vaguely supported by the browser natively, although you do have to find a way to output the CSS that impacts the SVG itself.

I recently made image export on some SVG charts that you could download as SVG and PNG and I was quite pleased I managed to do it without any library

1 comments

To be clear, my implementation is build-time only but could easily be adapted to be dynamically server rendered, and probably could be adapted to the browser if the underlying graphics library (Sharp) has WASM support. It does need some awareness of how to get styles which can be made pluggable, but works well with my heavily customized atomic CSS setup generating styles and classes with Fela.

My use cases are all very unusual, but they’d probably make portability a much simpler task because I hobbled together such a weird set of technologies.