Skip to content

bug(form-field): Outlined form-field should have enough space to contain floating label #31422

Open
@shhdharmen

Description

@shhdharmen

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

When using outline appearance for mat-form-field, the floating label overflows out of component itself. The mat-form-field component should have enough space on top to contain floating label. See below screenshot for reference:

Image

Reproduction

StackBlitz link: https://stackblitz.com/edit/rxp9hmcc?file=src%2Fexample%2Fform-field-appearance-example.html

Expected Behavior

The mat-form-field component should have enough space (margin) on top to contain floating label.

Actual Behavior

The mat-form-field component does not have enough space (margin) on top to contain floating label.

Environment

  • Angular: 20
  • CDK/Material: 20
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4A relatively minor issue that is not relevant to core functionsarea: material/form-field

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions