UI Deploy

Curated, Short, Web UI Dev we Love.

Styling SVGs inside image tags

You know the trade-off. Use the img tag to display an SVG, and you get clean markup — at the cost of styling the SVG using its properties like fill, stroke, SVG filters and more.

Using an SVG via an img tag seems practically useless, if the same SVG file requires to have different properties at different locations on your site.

view source

Advertisement