Opened 5 years ago
Closed 4 years ago
#4949 closed defect (bug) (fixed)
Add further Examples on Dashicons Page
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | low | |
Component: | Developer Hub | Keywords: | |
Cc: |
Description
The Dashicons Documentation https://developer.wordpress.org/resource/dashicons/#art shows code examples for using Dashicons in a custom post type and in HTML/CSS.
Dashicons are also used for Blocks in Gutenberg Editor and Taxonomies.
Maybe we should also add examples for these use cases.
Change History (3)
#2
@
5 years ago
Thanks for the ticket! Dashicons are not as widely used in the block editor any more, and the preferred syntax for block icons leverages the new icon syntax. This syntax:
icon={help}
This leverages the actual markup served in that constant, rather than being the name of an icon in a sprite. That also enables custom SVGs in an easier way.
I don't think the Dashicons component bundled with the block editor is deprecated, or will be any time soon. But it's a little bit a legacy way of doing it.
Thanks for this, @derweili! These examples should definitely be added to the bottom of the page.
Pinging @joen as this will be of interest to him as well.