Fix invisible start button chevron in forced colors mode #2277
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a re-creation of #2275 which was accidentally merged into the wrong base branch.
When forced color mode was introduced in Chrome 89, the default user agent styles for SVGs were set to
forced-color-adjust: none
in line with the CSS Color Adjustment specification at the time. Unfortunately, this means that using currentColor for stroke and fill in SVGs no longer works as expected in forced color mode.As per the comment in Chromium bug #1164162:
It looks like this has since been flagged as an issue with the CSS working group and the spec has been updated to resolve it but it’s going to take a while before that change is reflected in browsers.
In the meantime, we can explicitly set
forced-color-adjust: auto
on the chevron SVG in order for it to correctly inherit the color from the parent. This mimics the fix for the OGL logo in the footer made in 850c0b7 (#2273).Start link buttons
Start Buttons
Once Chromium has been updated so that the default UA styles for SVGs use the new
forced-color-adjust: preserve-parent-color
keyword, and traffic to older versions has dropped off, we can then consider removing this.