Can't color the svgs with css
See original GitHub issueHey,
I can’t color my svgs with CSS like this:
.icon.google:before {
background-position: 0em -3.3125em;
width: 0.9375em;
height: 0.9375em;
fill: red;
}
either this:
<span class="icon google" style="fill: red;"></span>
What am I doing wrong? Is there a possibility to style the svgs via CSS?
cheers bambamboole
Issue Analytics
- State:
- Created 7 years ago
- Reactions:6
- Comments:5
Top Results From Across the Web
I can't change the fill color of a SVG Sprite
My problem is that I'm not able to change the fill color of the elements added to the spritesheet. I have looked for...
Read more >Change Color of SVG on Hover
The way that I like to do it: 1. SVG: Make the SVG black #000000 where you want to control the color on...
Read more >Applying fill color to SVG doesn't work - Oxygen XML Forum
It works in HTML. I generate an HTML file with one CSS file, then clone the HTML and apply my print CSS. The...
Read more >How to change color of SVG (Various ways using CSS)
In this article, I have explained how we can change the color of SVG using CSS in various possible ways.
Read more >Changing SVG icon color and size via CSS? · Issue #235
I tried to remove color and width/height information from the svg-files and then tried to apply different CSS styles, e.g.:.
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
You cannot fill SVG likes that in CSS. You need to use another approach.
https://una.im/svg-icons/#💁
@Khaleel is right