How to color html svg element using css ?

Once my colleague told me or I also faced this problem with svg icons is that svg icons don’t match the color of text. In fact this was a huge problem, I was stuck that time but there is a pretty solution for this I didn’t think that time. To color a svg we use fill:colorname!

                  
                    svg {
                      fill: colorName;
                    }
                    svg {
                      fill: #454454;

                    }
                    svg {
                      border: 5px solid #636363;
                    }
                  
                

Leave a Reply

Your email address will not be published. Required fields are marked *