0

I have an icon svg like:

<svg width="90" height="90">       
     <image xlink:href="{{asset('images/menu-icons/some-icon.svg')}}"/>    
</svg>

It is showing nice but i want to change the the color in some instances(like hover or selected)

I used:

.menu-item svg{
    fill: red!IMPORTANT;
}

It doesn't change the color. Any help would be appreciated.

Miro
  • 225
  • 2
  • 10
  • 2
    Does this answer your question? [How to change the color of an svg element?](https://stackoverflow.com/questions/22252472/how-to-change-the-color-of-an-svg-element) – nfn Jul 22 '21 at 06:47

1 Answers1

0

I think you have your answers over here. You might be

  1. Using the svg as an image, in which case you can't change the color.
  2. The !important css keyword should be spaced from the property.