Skip to content

Commit

Permalink
Fix whitespace around the link icon
Browse files Browse the repository at this point in the history
  • Loading branch information
adamziel committed Jun 12, 2020
1 parent 91fa23a commit e03fceb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
1 change: 1 addition & 0 deletions packages/block-library/src/navigation-link/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ function NavigationLinkEdit( {
title={ __( 'Link' ) }
shortcut={ displayShortcut.primary( 'k' ) }
onClick={ () => setIsLinkOpen( true ) }
className="navigation-link-edit-link-button"
>
<span className="navigation-link-edit-link-label">
{ displayUrl }
Expand Down
23 changes: 15 additions & 8 deletions packages/block-library/src/navigation-link/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,24 @@
}

// Truncate long URLs in the toolbar
.block-editor-block-toolbar .navigation-link-edit-link-label {
display: inline-block;
max-width: 230px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
.block-editor-block-toolbar .navigation-link-edit-link-button {
&,
&.components-button.components-button.has-icon svg {
margin-right: 0;
}

.navigation-link-edit-link-label {
display: inline-block;
max-width: 230px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}

/**
* Adjust Navigation Item.
*/
* Adjust Navigation Item.
*/
.wp-block-navigation-link {
.block-editor-block-list__layout {
display: block;
Expand Down

0 comments on commit e03fceb

Please sign in to comment.