Unable to set color
See original GitHub issueHello,
I’m unable to set the color from a parent container in html.
<svg style="width:64px; height:64px; fill:red;" height="21" viewBox="0 0 21 21" width="21" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd" stroke="#2a2e3b" stroke-linecap="round" stroke-linejoin="round" transform="translate(2 3)"><path d="m1.5 4.5h14v7.9976807c0 1.1045695-.8954305 2-2 2h-10c-1.1045695 0-2-.8954305-2-2zm0-3.9777832h14c.5522847 0 1 .44771525 1 1v1.9777832c0 .55228475-.4477153 1-1 1h-14c-.55228475 0-1-.44771525-1-1v-1.9777832c0-.55228475.44771525-1 1-1z"></path><path d="m6.5 7.5h4"></path></g></svg>
results in
As I’m building a utility which inserts svg icons directly from markup (e.g. <x-systemuicon-archive style="width:64px; height:64px; fill:red;" />
results in the code above. Is there any possibility to make this work with classes without modifying the svg files?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Unable to set background color with Absolute and Fixed ...
I'm unable to set background color when i use position to my signin div and bottom div.I tried to remove position but it...
Read more >Can't Change Taskbar Color in Windows 11/10
Go to settings and click on Ease to Access · From the list of options under 'Vision,' click on Color filters. · In...
Read more >Can't Change Text Color (SOLVED!) | Photoshop - YouTube
Photoshop: Create a Powerful, Dramatic, Deep, Overlapping Text Effect with Reflection · Top 5 Excel Functions for Finance People (with end-to-end ...
Read more >Change the default text color (font color) in Word
Select the arrow next to Font color, and then choose a color. Font color in font dialog. Select Set As Default and then...
Read more >Possible bug: Can't change colors - Photoshop 2020
You are in grayscale color mode. Go to Image/Mode and change to RGB or CMYK.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Wulfheart You can change stroke of a svg file to
currentColor
. After that you can change parent’s color to change svg color. Wouldn’t it be a good idea to usecurrentColor
for every icon instead of constant for easier customisation? @CoreyGinnivan what do you think?Yep! All fixed