Skip to content

[master-detail-layout] Master size / min-size prevents layout from shrinking in stack mode #8946

Closed

Description

@sissbruecker

Description

When switching to stack mode, the layout stops shrinking at some point when the master has either an explicit size or a min-size. For example, a common use case would be to set a reasonably large min-size on the master together with a fixed size for the details so that it switches to overlay mode early, and then later to stack mode:

<vaadin-master-detail-layout master-min-size="600px" detail-size="300px" stack-threshold="600px"></vaadin-master-detail-layout>

With the configuration above, once the stack threshold is reached, the layout can not shrink anymore, causing overflow.

Note that the overflow does not occur in overlay mode.

Expected outcome

In stack mode the layout should still be able to shrink.

Minimal reproducible example

The dev page can be used.

Steps to reproduce

  • Set a reasonably large master size or min size, for example 600px
  • Enable stack threshold and resize the viewport below the master size / min size

Environment

Vaadin version(s): 24.8

Browsers

Issue is not browser related

Activity

  1. self-assigned this
    on Apr 15, 2025
  2. sissbruecker commented on Apr 15, 2025

    @sissbruecker
    MemberAuthor

    The same seems to happen if the details area is hidden. A min-size on the master area prevents it from shrinking if the layout is smaller than the min-size, causing overflow.

  3. jouni commented on Apr 16, 2025

    @jouni
    Member

    When no detail content is present, I think the master part should force min-width: auto !important;.

    And for the stack mode, the master and detail parts should force width: 100%; max-width: 100% !important; min-width: auto !important;.

    And accordingly in vertical mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions