Answer the question
In order to leave comments, you need to log in
Why svg icons don't follow styles?
Good day!
Faced with naughty svg icons. The site has more than 20 icons, all set to a basic style
.site-icon {
display: inline-block;
width: 1em;
height: 1em;
stroke-width: 0;
stroke: currentColor;
fill: currentColor;
}
Answer the question
In order to leave comments, you need to log in
https://codepen.io/topicstarter/pen/XoqoMK - it works if you quail according to the rules
, your main problem is that the styles are stroke-width and stroke and fill are specified inline in svg and therefore you can kill it only by writing any rule in css with important
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question