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

Fix nav block hover z index. #31929

Merged
merged 1 commit into from
May 19, 2021
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions packages/base-styles/_z-index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ $z-layers: (

// Navigation menu dropdown.
".has-child .wp-block-navigation-link__container": 28,
".has-child:hover .wp-block-navigation-link__container": 29,

// Active pill button
".components-button {:focus or .is-primary}": 1,
Expand Down
7 changes: 7 additions & 0 deletions packages/block-library/src/navigation-link/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@
z-index: z-index(".has-child .wp-block-navigation-link__container");
}

&:hover {
.submenu-container,
.wp-block-navigation-link__container {
z-index: z-index(".has-child:hover .wp-block-navigation-link__container");
}
}

// Show on editor selected, even if on frontend it only stays open on focus-within.
&.is-selected,
&.has-child-selected {
Expand Down