Leverage the CSS keyword "currentColor" to ensure a SVG stroke inherits the Font Color

Nik Graf
InstructorNik Graf

Share this video with your friends

Send Tweet

The CSS keyword currentColor allows you to set the color of all sorts of CSS properties like background-color, border-color, stroke, fill to the current font color. In this lesson we demonstrate this setting the stroke of an SVG to currentColor.

currentColor is well supported by all browser vendors. Even IE9 has it as you can see here: https://caniuse.com/#feat=currentcolor