diff --git a/packages/block-library/src/navigation-submenu/editor.scss b/packages/block-library/src/navigation-submenu/editor.scss index e53e11e4fdbf0c..627978a00f6492 100644 --- a/packages/block-library/src/navigation-submenu/editor.scss +++ b/packages/block-library/src/navigation-submenu/editor.scss @@ -17,7 +17,7 @@ width: auto !important; // These styles are needed to display the dropdown properly when it is empty. position: absolute; - left: -1em; + left: -1px; // Border width. top: 100%; @include break-medium { diff --git a/packages/block-library/src/navigation/style.scss b/packages/block-library/src/navigation/style.scss index a6cd74ad311d9a..4989bc0d7f1aee 100644 --- a/packages/block-library/src/navigation/style.scss +++ b/packages/block-library/src/navigation/style.scss @@ -121,11 +121,10 @@ // Don't take up space when the menu is collapsed. width: 0; height: 0; - overflow: hidden; // Submenu items. > .wp-block-navigation-item { - > a { + > .wp-block-navigation-item__content { display: flex; flex-grow: 1; @@ -142,12 +141,12 @@ } // Spacing in all submenus. - a { + .wp-block-navigation-item__content { margin: 0; } // Submenu indentation when there's no background. - left: -1em; + left: -1px; // Border width. top: 100%; // Indentation for all submenus. @@ -184,7 +183,6 @@ opacity: 1; width: auto; height: auto; - overflow: initial; min-width: 200px; } @@ -253,7 +251,7 @@ // https://css-tricks.com/almanac/selectors/w/where/ // Set the default menu item padding to zero, to allow text-only buttons. -.wp-block-navigation a { +.wp-block-navigation .wp-block-navigation-item__content { padding: 0; } @@ -264,7 +262,7 @@ } // Provide a default padding for submenus who should always have some, regardless of the top level menu items. -.wp-block-navigation :where(.wp-block-navigation__submenu-container) a { +.wp-block-navigation :where(.wp-block-navigation__submenu-container) .wp-block-navigation-item__content { padding: 0.5em 1em; }