[wp-trac] [WordPress Trac] #39261: Possible wrong base color for admin SVG-icons

WordPress Trac noreply at wordpress.org
Mon Feb 26 22:38:20 UTC 2024


#39261: Possible wrong base color for admin SVG-icons
-------------------------+-------------------------------------------------
 Reporter:  robsat91     |       Owner:  (none)
     Type:  defect       |      Status:  new
  (bug)                  |
 Priority:  normal       |   Milestone:  Awaiting Review
Component:               |     Version:  4.7
  Administration         |
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:  ui, javascript, css,
  2nd-opinion            |  administration, template
-------------------------+-------------------------------------------------
Changes (by sabernhardt):

 * keywords:   => has-patch 2nd-opinion
 * focuses:  ui, javascript, administration, template => ui, javascript,
     css, administration, template
 * component:  General => Administration


Old description:

> Hello!
>
> I'm currently working with custom SVG icons for my custom post types, but
> i can see that these icons have a slightly different color than the
> native dashicons. It seems like the SVG-painter paints my SVG-icons in
> the wrong base-color.
>
> I'm using the default theme "fresh" and the base is set to "#82878c". If
> i change to for example "#9EA3A8" my SVG-icons looks more like the native
> dashicons. Maybe the basecolor is a bit off?
> File: wp-includes/general-template.php:3428
>
> I can also see that this affects the SVG in other plugins (Yoast SEO,
> WPML etc.).
>
> Best regards, Robert Sather.

New description:

 Hello!

 I'm currently working with custom SVG icons for my custom post types, but
 i can see that these icons have a slightly different color than the native
 dashicons. It seems like the SVG-painter paints my SVG-icons in the wrong
 base-color.

 I'm using the default theme "fresh" and the base is set to `#82878c`. If i
 change to for example `#9EA3A8` my SVG-icons looks more like the native
 dashicons. Maybe the basecolor is a bit off?
 File: [https://core.trac.wordpress.org/browser/branches/4.7/src/wp-
 includes/general-template.php#L3428 wp-includes/general-template.php:3428]

 I can also see that this affects the SVG in other plugins (Yoast SEO, WPML
 etc.).

 Best regards, Robert Sather.

--

Comment:

 The colors were updated in [50025], but I still see a slight variation
 between the Yoast SEO icon and dashicons in the default color scheme.

 We could consider removing the RGBA and assign the hexadecimal color only.
 [31422] added the RGBA with a fallback for older browsers, and now
 browsers would rarely use hexadecimal for the dashicons. However, in the
 unfinished custom properties project, @ryelle's [https://github.com/ryelle
 /wordpress-develop/commit/59f8c6a151945ce7ffc61ea5a6a90575de50fe7d#diff-
 9ea2ef58de49a0cca09e06654a3899469b483b80ee33e858c48cae72980cfa49R4 branch]
 suggested defining the color with the hex code.

 I would rather not try using `opacity` (of about 0.9) in the default
 scheme because it would not be appropriate in the other schemes.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/39261#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list