DEV Community

Discussion on: Benefits of SVG

Collapse
 
filibit profile image
Filip Biterski

Nice post, I like that you mentioned CSS and JS manipulations on SVG because many developers aren't aware of that.

I also think that web dev community too strongly associates SVG with images (including you), and in the process neglect how the SVG actually contains individual DOM nodes (graphic elements) that can be dynamically manipulated. With that kind of thinking, there's basically nothing (regarding the UI) one couldn't build in a modern browser using SVG. There are some web apps that do use SVG dynamically to create unique user interactions, mind mapping apps are an example of that, and I've also built one. One could even reproduce the look of HTML of any web page with SVG, though I can't see a reason to do that.

Collapse
 
alexi_be3 profile image
Alexi Taylor 🐶

Thank you for pointing this out. I updated the article and added a section, "More Than an Image", to address this concern.

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt

Therefore a security risk?

I also realize that there is possibility for HTML inside SVG (inside IMG tag inside Markdown)