RichTextToolbarButton adding dashicons makes them squashed to text #29376
Labels
[Feature] Rich Text
Related to the Rich Text component that allows developers to render a contenteditable
[Package] Rich text
/packages/rich-text
[Status] In Progress
Tracking issues with work in progress
Description
When creating a custom formatting button for the
RichText
component usingRichTextToolbarButton
, if you specify the icon as the name of the dashicons iconyou get this
However, if you use svg - and not just copy pasted one, that won't work, you need to recreate the svg using primitives
It looks ok because the SVG element will be rendered instead of dashicons which is just added as a pseudo-element and has no styling for it.
SVG elements have
whereas dashicons icons have
Notice the missing margin on the right.
Step-by-step reproduction instructions
Expected behaviour
Stylings should be the same
Actual behaviour
Stylings are not the same, and I need to copy and paste, then transform the SVG to 'primitives' in order to be rendered properly.
WordPress information
Device information
The text was updated successfully, but these errors were encountered: