You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Certain library icons have visible portions outside this 4px-inset view box, and thus will be clipped.
With some raster tests, I was able to identify a list of affected icons.
(☝️ This is just a preview, see the full list on StackBlitz)
While there are some clipped icons that are less noticeable and we can maybe let slide, there are still dozens of icons that will not be usable in the current state.
Proposed fix
Two possible strategies to address:
Find a better compromise (e.g. drop the viewbox hack and add a margin offset in CSS, or tweak the viewbox hack so they're less problematic with these flagged icons).
Are all @wordpress/icons expected to be 24px and have a 4px empty padding around the main glyph? That could tip the balance towards redraing the flagged icons.
Otherwise, we can try the negative margin hack (as per #78614), although it will still cause sub-optimal layouts with those problematic icons — instead of clipping, they will just create incosistent spacing withing button
They are not always expected to have 4px padding, because the guidelines are optically balanced, not physically. E.g. three icons, one square, one horisontal rectangle, one vertical rectangle, can be optically balanced because of their perceived volume, while still have different dimensions. It sounds like the negative margin approach might allow the contents to go outside the overflow, in which case that would adhere to the optical spirit, probably.
I will note that a few of those icons will need to be redesigned regardless. These are hurriedly ported dashicons we never got to replace:
keyboardClose (darker than keyboard)
insertBefore
insertAfter
These icons are not designed according to wordpress icon principles, and may be material icons:
offline
There are more icons in both those two categories above, but for the moment I focused only on those you flagged as clipped.
Activity
ciampo commentedon May 25, 2026
Are all
@wordpress/iconsexpected to be 24px and have a 4px empty padding around the main glyph? That could tip the balance towards redraing the flagged icons.Otherwise, we can try the negative margin hack (as per #78614), although it will still cause sub-optimal layouts with those problematic icons — instead of clipping, they will just create incosistent spacing withing button
jameskoster commentedon May 26, 2026
Another casualty of #65786. Although not perfect the negative margin approach seems the quickest win.
jasmussen commentedon May 26, 2026
They are not always expected to have 4px padding, because the guidelines are optically balanced, not physically. E.g. three icons, one square, one horisontal rectangle, one vertical rectangle, can be optically balanced because of their perceived volume, while still have different dimensions. It sounds like the negative margin approach might allow the contents to go outside the overflow, in which case that would adhere to the optical spirit, probably.
I will note that a few of those icons will need to be redesigned regardless. These are hurriedly ported dashicons we never got to replace:
These icons are not designed according to wordpress icon principles, and may be material icons:
There are more icons in both those two categories above, but for the moment I focused only on those you flagged as clipped.
mirka commentedon May 26, 2026
Out of the those, these two can perhaps be quickly fixed for mispositioning within the viewbox, even if we need to redraw them later:
aaronjorbin commentedon May 26, 2026
Adding to WordPress 7.0 editor tasks board so that any eventual fix can be considered for backporting to WordPress 7.0
mirka commentedon May 26, 2026
@aaronjorbin I think we're good, there should be no usages of
Button.Icon(from@wordpress/ui) in WP 7.0.aaronjorbin commentedon May 26, 2026
@mirka 🤦 I absolutely read this as Icon block. Sorry about that.