Changing color of an SVG with CSS

Published on: Wednesday, 10.01.2024

If SVG's fill value is set as currentColor it will inherit the color of your font family. This makes it easy to change the SVG's color with simple CSS.

<svg width="1.13em" height="1em"><path fill="currentColor"></path></svg>
svg {
 color: blue;
}