themes icon indicating copy to clipboard operation
themes copied to clipboard

Assembler: Tall drop down menus overflow the container and are clipped

Open mrfoxtalbot opened this issue 8 months ago • 2 comments

Quick summary

The main menu is nested inside a cover block that is site as overflow:hidden.

If enough drop-down menus are added to the main menu, they will overflow and become invisible & unreachable.

Here's a video:

https://github.com/Automattic/themes/assets/4452464/1d84262c-4944-4ce1-8493-948cd0644dfc

Adding this CSS fixes the issue (but it might be too generic and affect cover blocks elsewhere). Perhaps we could use .wp-site-blocks > .wp-block-cover:has(.wp-block-navigation__submenu-container) to increase specificity:

.wp-site-blocks > .wp-block-cover {
  overflow:visible 
}

After adding this code, the dropdown is no longer constrained by the cover block's height: Screenshot 2024-06-04 at 11 13 13

Context: 8268355-zd-a8c

Steps to reproduce

  1. Activate Assembler
  2. Set up a header that includes a cover.
  3. Add enough items to a submenu to make it overflow.

What you expected to happen

All items should remain visible.

What actually happened

Submenu items were clipped.

mrfoxtalbot avatar Jun 04 '24 09:06 mrfoxtalbot