Skip to content

Commit

Permalink
Improve submenu indicator styling
Browse files Browse the repository at this point in the history
  • Loading branch information
talldan committed Apr 16, 2020
1 parent 997521b commit a85eb79
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions packages/block-library/src/navigation-link/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,12 +279,12 @@ function NavigationLinkEdit( {
/>
</Popover>
) }
{ showSubmenuIcon && (
<span className="wp-block-navigation-link__submenu-icon">
<ItemSubmenuIcon />
</span>
) }
</div>
{ showSubmenuIcon && (
<span className="wp-block-navigation-link__submenu-icon">
<ItemSubmenuIcon />
</span>
) }
<InnerBlocks
allowedBlocks={ [ 'core/navigation-link' ] }
renderAppender={
Expand Down
6 changes: 3 additions & 3 deletions packages/block-library/src/navigation/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,6 @@ function block_core_navigation_build_html( $attributes, $block, $colors, $font_s

$html .= '</span>';

$html .= '</a>';
// End anchor tag content.

// Append submenu icon to top-level item.
// it shows the icon as default, when 'showSubmenuIcon' is not set,
// or when it's set and also not False.
Expand All @@ -271,6 +268,9 @@ function block_core_navigation_build_html( $attributes, $block, $colors, $font_s
$html .= '<span class="wp-block-navigation-link__submenu-icon">' . block_core_navigation_render_submenu_icon() . '</span>';
}

$html .= '</a>';
// End anchor tag content.

if ( $has_submenu ) {
$html .= block_core_navigation_build_html( $attributes, $block, $colors, $font_sizes );
}
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/navigation/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
}

.wp-block-navigation-link__submenu-icon {
padding: $grid-unit-10 * 0.75 $grid-unit-10 * 2;
padding-left: 1ch;

svg {
fill: currentColor;
Expand Down

0 comments on commit a85eb79

Please sign in to comment.