Lesson

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

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.

Duration
1 min
Access
Free
Transcript
Available

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