Skip to content

[menu-bar] Move submenu to the slot to make its overlay stylable globally #9707

Open
@web-padawan

Description

@web-padawan

Motivation

With native popover, we'll no longer teleport vaadin-menu-bar-overlay to the body but instead keep it in the shadow DOM of the vaadin-menu-bar-submenu. We should make sure it can be styled with light DOM CSS.

Proposed solution

Move root level vaadin-menu-bar-submenu to the vaadin-menu-bar light DOM e.g. slot="submenu".

This way the following CSS can be used for styling all the submenus after switching to popover:

vaadin-menu-bar-submenu::part(overlay) {
  /* all submenus */
}

vaadin-menu-bar-submenu[is-root]::part(overlay) {
  /* root level submenu */
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions