Skip to content

Commit

Permalink
Fix navigation block styles in the navigation editor (#29748)
Browse files Browse the repository at this point in the history
  • Loading branch information
talldan authored Mar 11, 2021
1 parent b931043 commit 647a41c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/edit-navigation/src/components/editor/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
.wp-block-navigation-link {
display: block;

&.has-child:hover > .wp-block-navigation-link__container {
display: none;
}

// Fix focus outlines
&.is-selected > .wp-block-navigation-link__content,
&.is-selected:hover > .wp-block-navigation-link__content {
Expand Down Expand Up @@ -75,14 +79,16 @@
}

// Override Nav block styling for deeply nested submenus.
.has-child .wp-block-navigation__container .wp-block-navigation__container {
.has-child .wp-block-navigation__container .wp-block-navigation__container,
.has-child .wp-block-navigation__container .wp-block-navigation-link__container {
left: auto;
}

// When editing a link with children, highlight the parent
// and adjust the spacing and submenu icon.
.wp-block-navigation-link.has-child.is-editing {
> .wp-block-navigation__container {
> .wp-block-navigation__container,
> .wp-block-navigation-link__container {
opacity: 1;
visibility: visible;
position: relative;
Expand Down

0 comments on commit 647a41c

Please sign in to comment.