currentColor works in Chrome 4+, Edge 12+, Firefox 2+, Safari 4+, Opera 9.5+, Samsung Internet, Android 2.1+, and IE 9+, with global support near 97%.

Prince Dewani
May 6, 2026
currentColor is a CSS keyword that resolves to the computed value of an element's color property and lets you reuse that color on any property that takes a <color>. It works in Chrome 4+, Edge 12+, Firefox 2+, Safari 4+ on macOS and iOS, Opera 9.5+, Samsung Internet, Android Browser 2.1+, and Internet Explorer 9+.
This guide covers what currentColor is, the browsers that support it, where you can use it, how to use it with SVG, and known issues.
currentColor is a CSS keyword from the W3C CSS Color Module that always resolves to the computed value of the same element's color property. You can use it as a value for any property that accepts a <color>, including border, background, outline, box-shadow, text-decoration-color, and SVG fill and stroke.
Every major browser supports currentColor: every Chromium-based browser, Firefox, Safari on macOS and iOS, and Internet Explorer 9 and later, with global support near 97%.
Chrome supports currentColor from Chrome 4 on Windows, macOS, Linux, ChromeOS, and Android. Every release since has shipped it on by default with no flag, and the keyword resolves the same way in border, background, box-shadow, text-decoration-color, linear-gradient, and SVG fill and stroke. Chrome 1 to 3 did not support it.
Microsoft Edge supports currentColor from EdgeHTML 12 onward and on every Chromium-based Edge from Edge 79. The keyword works in border, background, outline, and SVG presentation attributes. EdgeHTML 12 to 18 had a long-standing quirk where currentColor inside linear-gradient resolved to black, which the Chromium-based Edge versions fixed.
Firefox supports currentColor from Firefox 2 on every desktop platform and from Firefox for Android 4 on Android. Gecko has shipped it on by default with no flag for the entire time, and it works inside linear-gradient, conic-gradient, accent-color, border, outline, box-shadow, and SVG fill and stroke. Firefox 1 to 1.5 did not support it.
Safari supports currentColor from Safari 4 on macOS and from Safari 4 on iOS. WebKit applies it in border, background, box-shadow, text-decoration-color, gradient stops, and SVG fill and stroke. Early WebKit had a bug where currentColor inside ::before and ::after content resolved to black; later WebKit releases fixed the issue, so any current iPhone or iPad picks up the inherited color cleanly.
Opera supports currentColor from Opera 9.5 on Windows, macOS, and Linux, and from Opera Mobile 12 on Android. The Presto-era Opera 9.5 to 12.1 implemented it natively, and every Chromium-based Opera from Opera 15 inherits Chrome's behavior. Opera Mini renders it correctly through its server-rendered pipeline as well.
Samsung Internet supports currentColor on every shipping version on Galaxy phones because the browser tracks the Chromium engine that Chrome for Android uses. The keyword resolves identically in border, gradient stops, accent-color, and SVG presentation attributes, so cross-browser code that targets both Chrome and Samsung Internet behaves the same.
Android Browser supports currentColor from Android 2.1 on. Chrome for Android, modern Android WebView, Samsung Internet, and Opera Mobile all expose it, so any device on Android Lollipop or later resolves it correctly in border, background, gradients, and SVG fill. The legacy stock browser on Android 2.1 to 4.4 supports it for color, border, and SVG fill but trips on gradient stops.
Internet Explorer supports currentColor from IE 9 through IE 11. IE 5.5 to IE 8 did not support it. IE 10 and IE 11 also resolve currentColor to black inside linear-gradient and radial-gradient, which is a known engine bug. Microsoft has retired Internet Explorer, so production code can drop the IE branch.
Note: currentColor mostly works everywhere, but the gradient and pseudo-element edge cases on legacy Edge, IE 11, and old WebKit still bite. Test it on real browsers and OS with TestMu AI. Try TestMu AI free!
currentColor is valid anywhere a CSS <color> type is accepted. That covers most surface-level paint properties on HTML elements and the fill and stroke attributes on SVG.
Inline SVG inside an HTML page can set fill="currentColor" or stroke="currentColor" on any shape. The SVG element reads the parent HTML element's color property and paints itself with that value, which is why icon libraries lean on the keyword for theme-aware icons.
Paste this snippet into an HTML page and hover the link in DevTools. The icon recolors automatically because both the fill and the stroke point at currentColor.
<!-- Inline SVG inside an anchor inherits the link's color value. -->
<!-- Hover the link in DevTools and watch the icon recolor. -->
<a href="/inbox" style="color: dodgerblue">
<svg width="16" height="16" viewBox="0 0 16 16" aria-hidden="true">
<path fill="currentColor" d="M2 4h12v8H2z" />
<path stroke="currentColor" stroke-width="1.5" fill="none" d="M2 4l6 5 6-5" />
</svg>
Inbox
</a>
<style>
a:hover { color: tomato; } /* fill and stroke follow */
a:focus { color: rebeccapurple; } /* same here */
</style>The keyword only inherits across the SVG's own document, so an SVG loaded through an <img> tag, a CSS background-image, or an <object> cannot read the host page's color. Inline the SVG, or reference a <symbol> through a <use> tag in the same document, to make fill="currentColor" pick up the parent color.
currentColor is rock-solid on modern browsers, but a handful of legacy quirks and surprising inheritance rules still trip up real codebases.
In my experience, the trap that bites every icon-library integration once is the external-SVG case. A team inlines a single <img src="icon.svg"> with fill="currentColor" baked in, sees a black icon in production, and chases the bug for an hour. Switch the tag to inline SVG or to a <symbol> with <use> and the color inherits as expected.
All currentColor version numbers and platform notes in this guide come from these primary sources:
Did you find this page helpful?
More Related Hubs
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance