Opened 6 years ago
Closed 6 years ago
#44209 closed defect (bug) (fixed)
Admin Menu SVG Icon colour wrong in Default colour scheme
Reported by: | swift | Owned by: | swift |
---|---|---|---|
Milestone: | 5.1 | Priority: | normal |
Severity: | normal | Version: | 4.5 |
Component: | Administration | Keywords: | has-screenshots good-first-bug |
Focuses: | ui, administration | Cc: |
Description
When using a SVG as an icon for an admin menu, the default color scheme shows the svg icons as a different colour (#82878c) than font icons (#a0a5aa). Other colour schemes seem to render svg icons correctly. Seems like it's related to /wp-includes/general-template.php line 3886 (WP 4.9.5), and possibly /wp-admin/includes/misc.php line 713. Changing 'base' => '#82878c' to 'base' => '#a0a5aa' fixes the issue for me.
Attachments (2)
Change History (13)
#2
@
6 years ago
- Keywords has-patch added; needs-patch removed
I've made a patch for this - it's my first ever so hopefully it's correct.
#3
@
6 years ago
- Resolution set to worksforme
- Status changed from new to closed
I have tested this and can confirm that it works :)
#5
@
6 years ago
- Keywords commit added
- Milestone changed from Awaiting Review to 4.9.9
- Owner set to swift
- Status changed from reopened to assigned
- Version set to 4.5
Assigning to mark good-first-bug
claimed. Thanks for the patch, @swift, and thank you for testing @dschalk!
It looks like this color was changed in [36587]. The goal there was to improve color contrast for a11y. This change makes the colors consistent while maintaining a proper level of contrast.
I was able to reproduce the issue with several plugins that use SVG icons, and #44209.diff fixed them all for me.
SVG Admin Icon colour wrong in default colour scheme (eg. Conference vs. Comments)