You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Background:
For inline SVG icons that need to match the surrounding text color, the recommended technique is to use fill: currentColor or stroke: currentColor. In addition to being DRY-er than setting an explicit color, this makes sure that the color adjusts to match any forced color changed (e.g., Windows High Contrast Mode).
However, in other SVG, fill colour is part of the graphic and shouldn't automatically be adjusted by high contrast mode.
In #3855, we therefore agreed that forced-color-adjust: none should apply to all SVG, with the understanding that the currentColor technique for inline icons would still work because the inherited color from the surrounding HTML markup would already be adjusted. https://drafts.csswg.org/css-color-adjust-1/#propdef-forced-color-adjust
As an aside: they hypothetical example @alisonmaher brings up in #4915 (comment) doesn't seem like something that would be common (currentColor SVG text on top of an explicitly-coloured SVG background). In contrast, the example CodePen above uses a technique (currentColor for SVG with transparent background embedded within text) that has been widely advocated as the correct way to do accessible inline SVG icons!
smhigley and Th3S4mur41smhigley, ericwbailey, 36degrees and Jollus174