I am currently faced with a challenge involving CSS, where I need to modify the size and color of an SVG element that is being displayed using <use>
. The specific SVG in question is as follows:
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
<path fill="#000000" fill-rule="evenodd" d="<all the actual svg path info>" clip-rule="evenodd"/>
</svg>
Unfortunately, I do not have authorization to make any changes directly within the SVG itself. How I am utilizing this SVG:
<svg>
<use xlink:href="#myIcon"></use>
</svg>
I have spent countless hours trying different approaches, even consulting an extensive article on this topic, yet I have been unsuccessful. I have attempted applying classes to both the use
element and the outer svg
element, as well as referencing the path
element within. However, I am unable to override the default styles provided. Is there a way for me to adjust the width, height, and fill color following this structure?