Reputation: 179
I'm having some problems filling an InlineSVG. I have a div
with the svg:
<div class="svg-div" [inlineSVG]="'../../../assets/images/add.svg'"></div>
Then in CSS:
.svg-div {
fill: blue;
}
but the icon remains grey.
I've also tried:
.svg-div ::ng-deep svg{
fill: blue;
}
in different combinations, but nothing worked.
Here is the link to my stackblitz. What's wrong?
Upvotes: 0
Views: 2421
Reputation: 7119
It is not working because fill attribute is hardcoded in your svg file. Remove fill="#7A7A7A" from your svg file then you will be able to change color through css.
Upvotes: 0