Skip to content

bug(form-field): matTextSuffix/matTextPrefix not vertically aligned with label #28448

Open
@mohammedsahl

Description

@mohammedsahl

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

The label of a mat-form-field is not vertically aligned with the matTextSuffix or matTextPrefix.

Screenshot 2024-01-18 at 8 42 10 AM

Notice how the suffix and prefix are a couple or so pixels above the label

Reproduction

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

Expected Behavior

Label to be vertically aligned with both matTextSuffix and matTextPrefix

Actual Behavior

Label is not vertically aligned with both matTextSuffix and matTextPrefix

Environment

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/form-field

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions