Skip to content

[text-field] Allow width to shrink below default width out of the box #606

Open
@rolfsmeds

Description

@rolfsmeds

Description

Textfields currently don't shrink below their default width unless either

  • a specific width has been set, or
  • min-width is set to something smaller

While this is intentional, and aligns with the behavior of the native input element, we might want to consider changing it to allow shrinking down to maybe not zero but something significantly smaller than the default width without requiring the developer to set a width or min-width.

Steps to Reproduce

  1. Put two vaadin-text-field elements in a vaadin-horizontal-layout with width:100%.
  2. Shrink the horizontal-layout to less than 2x the default textfield width.

Expected Results

Both textfields shrink to fit into the layout

Actual Results

The textfield(s) overflow the layout horizontally.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions