Skip to content

Commit

Permalink
Fix IconButton indent regression
Browse files Browse the repository at this point in the history
Yesterday I merged a fix to the IconButton component which adds a `text-indent` for when the component has text. This works because the SVG inside is not affected by text-indent.

But the quick-shortcuts in the block appender wrap this icon with a `span`, which _is_ affected by the text-indent.

I can look for other solutions that do not rely on text-indent, but simply removing this span entirely seems to have no negative effects. Why was it added? No CSS appears to target the element.
  • Loading branch information
Joen Asmussen committed Mar 1, 2018
1 parent 52fa016 commit dfd8a0a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions editor/components/inserter-with-shortcuts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ function InserterWithShortcuts( { items, isLocked, onToggle, onInsert } ) {
onClick={ () => onInsert( item ) }
label={ sprintf( __( 'Add %s' ), item.title ) }
icon={ (
<span className="editor-inserter-with-shortcuts__block-icon">
<BlockIcon icon={ item.icon } />
</span>
<BlockIcon icon={ item.icon } />
) }
/>
) ) }
Expand Down

0 comments on commit dfd8a0a

Please sign in to comment.