Make WordPress Core

Opened 20 months ago

Last modified 9 months ago

#50249 new defect (bug)

color-picker dashicon not showing

Reported by: Lwangaman Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.4.1
Component: Editor Keywords:
Focuses: ui Cc:


When creating a PanelBody in the InspectorControls for Gutenberg block, and using 'color-picker' from Dashicons, no icon is rendered. Other dashicons are working, but 'color-picker' is not.

Sample code:

createElement(PanelBody, { title: __('Border color','textdomain'), initialOpen: false, icon: 'color-picker' },
        createElement(ColorPicker, {
                color: attributes.PARAGRAPHSTYLES_BORDERCOLOR,
                disableAlpha: false,
                onChangeComplete: changeParagraphStyleBorderColor

Change History (5)

#2 @Lwangaman
20 months ago

Using the 'color-picker' icon in an html element using css classes works fine:

<h2 class="dashicons-before dashicons-color-picker">A Colorful Headline</h2>
<h2><span class="dashicons dashicons-color-picker"></span> A Colorful Headline</h2>

It is only when using the string 'color-picker' to indicate the icon when creating a Gutenberg PanelBody that the icon is not shown:

createElement(PanelBody, { title: __('Background color','textdomain'), initialOpen: false, icon: 'color-picker' }

Icon not shown. Other icons work fine:

createElement(PanelBody, { title: __('Layout options','textdomain'), initialOpen: false, icon: 'admin-appearance' }
Last edited 20 months ago by Lwangaman (previous) (diff)

#3 @sabernhardt
10 months ago

  • Component changed from Administration to Editor
  • Keywords reporter-feedback removed

This ticket was mentioned in Slack in #core by peterwilsoncc. View the logs.

9 months ago

#5 @chaion07
9 months ago

Hello @Lwangaman,

Thank you for putting together this information. This ticket was discussed in a Core Triage session and it seems as if the issue is related to the Block Editor. Since this issue is best reported using the [Gutenberg repository], we suggest you refer to this issue: that talks about color picker icon. Hope this helps. Thank you!

Note: See TracTickets for help on using tickets.