Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigation: Fix click-button size, submenu directions, scrollbars. #36215

Merged
merged 4 commits into from
Nov 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 16 additions & 12 deletions packages/block-library/src/navigation/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -269,18 +269,22 @@
// When justified space-between, open submenus leftward for last menu item.
// When justified right, open all submenus leftwards.
// This needs high specificity.
// On smaller breakpoints, menus open downwards.
@include break-medium {
.wp-block-navigation.items-justified-space-between .wp-block-page-list > .has-child:last-child,
.wp-block-navigation.items-justified-space-between > .wp-block-navigation__container > .has-child:last-child,
.wp-block-navigation.items-justified-right .wp-block-page-list > .has-child,
.wp-block-navigation.items-justified-right .wp-block-navigation__container .has-child {
// First submenu.
.wp-block-navigation__submenu-container {
left: auto;
right: 0;
.wp-block-navigation.items-justified-space-between .wp-block-page-list > .has-child:last-child,
.wp-block-navigation.items-justified-space-between > .wp-block-navigation__container > .has-child:last-child,
.wp-block-navigation.items-justified-right .wp-block-page-list > .has-child,
.wp-block-navigation.items-justified-right .wp-block-navigation__container .has-child {
// First submenu.
.wp-block-navigation__submenu-container {
left: auto;
right: 0;

// Nested submenus.
// Nested submenus.
// On smaller breakpoints, nested menus open downwards.
.wp-block-navigation__submenu-container {
left: -1px; // Border width.
right: -1px;
}
@include break-medium {
.wp-block-navigation__submenu-container {
left: auto;
right: 100%;
Expand Down Expand Up @@ -448,7 +452,7 @@
display: block;
width: 100%;
position: relative;
z-index: 2;
z-index: auto;
background-color: inherit;

.wp-block-navigation__responsive-container-close {
Expand Down