Fix: Hide non-svg icons when "Show button text labels" is active#66150
Fix: Hide non-svg icons when "Show button text labels" is active#66150dougwollison wants to merge 1 commit intoWordPress:trunkfrom
Conversation
hide potential img and span.dashicon elements, in addition to svg icons note: link-control likely would never contain a dashicon, and global styles currently seems to only have hard-coded SVG icons
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
What?
Adds
imgand.dashiconto the.show-icon-labelsstyles that currently only hide SVG icons.Note: since GlobalStylesSidebar only has hard-coded icons, it's been excluded. Likewise, LinkControl only seems to potentially have
icons, so only img was added to the selector.
Why?
Blocks, plugins, formats, etc can be registered with a dashicon or potentially an
element, rather than an SVG icon. Currently, if, say, a block has a dashicon for it's icon, that dashicon will still be visible when Show Button Text Labels is enabled, and it overlaps with the text.
Testing Instructions
Screenshots or screencast
Current handling with example block using dashicon icon.