How do I change the color/fill of a svg from an image collection

0
Hi,   I have a requirement where some buttons have an icon and based on the :hover/Active/focus state it changes color. Normally with CSS I would target the SVG element in my html like: svg { fill: green } or what ever class i gave it. But the way mendix loads buttons with icon is within an <img> tag. I tried removing the fill property in the SVG or setting the fill property to currentColor but i cant target the svg because its bascially an img instead. And well changing the color of an image is not possible.. Anyone encoutered this?
asked
1 answers
0

A SVG object can be changed in color with a filter css statement.

Thus:

 

img {

  filter: …

}

answered