Opened 8 months ago
Last modified 8 months ago
#50249 new defect (bug)
color-picker dashicon not showing
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 5.4.1 |
Component: | Administration | Keywords: | reporter-feedback |
Focuses: | ui | Cc: |
Description
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 (2)
#2
@
8 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' }
Note: See
TracTickets for help on using
tickets.
Here is the link to the corresponding dashicon: https://developer.wordpress.org/resource/dashicons/#color-picker .