angular / angular/components

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

オープン
#28,448 コメント 2 件 リアクション 2 件 担当者 0 名 GitHub で見る
area: material/form-field P3
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

### 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](https://github.com/angular/components/assets/32067562/47159140-76bf-4b6c-ab2f-2e76f2fced4a)

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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

src/example/form-field-prefix-suffix-example.html にあるリンク先の StackBlitz reproduction から始め、Angular 16 における label と matTextSuffix/matTextPrefix の垂直方向のずれを確認します。その例を起点に Material form-field のレンダリングとスタイルを追跡し、その後、reproduction で label、prefix、suffix が垂直方向に揃っていることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
design, frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。