[wp-trac] [WordPress Trac] #54573: Reserved color slugs in theme.json?

WordPress Trac noreply at wordpress.org
Fri Dec 3 17:18:56 UTC 2021

#54573: Reserved color slugs in theme.json?
 Reporter:  ndiego        |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
 This appears to only be an issue in 5.9 Beta 1 and not in Gutenberg 12+.
 If you register a color palette in your theme's `theme.json` with the
 custom color slugs are the same as those in Core's default color palette,
 they do not show up in the editor.

 For example, the default color palette in Core has both `black` and
 `white` slugs, and therefore, it appears that you cannot register the same
 slugs in a theme. They simply do not show up. What is strange is that if
 you active Gutenberg, the `black` and `white` colors appear as they should
 in the "Theme" section of the color picker component.

 So there must be a discrepancy in the way that Core and Gutenberg handle
 the core/default color palette slugs. If these slugs are truly "reserved"
 and cannot be used in theme, we should add that to the handbook.

Ticket URL: <https://core.trac.wordpress.org/ticket/54573>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list