angular / angular/components

bug(material/form-field): A density of -2 or lower breaks labels

オープン
#27,477 コメント 8 件 リアクション 0 件 担当者 0 名 GitHub で見る
area: material/form-field P2
主要言語
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

When setting a density of -4 on a form field with a `matSuffix`, the text is not aligned.

density -4
image

density 0
image

### Reproduction

StackBlitz link: https://stackblitz.com/edit/uprkxp?file=src%2Ftheme.scss
Steps to reproduce:
1. Set density of -4
2. Observe how input text is not vertically aligned any longer

### Expected Behavior

Input text should always be vertically aligned, regardless of density.

### Actual Behavior

Density -4 does not vertically align input text

### Environment

Angular CLI: 15.1.6
Node: 18.13.0
Package Manager: npm 8.19.3
OS: darwin x64

Angular: 15.1.5
... animations, cdk, common, compiler, compiler-cli, core, forms
... material, platform-browser, platform-browser-dynamic, router

Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1501.6
@angular-devkit/build-angular 15.1.6
@angular-devkit/core 15.1.6
@angular-devkit/schematics 15.1.6
@angular/cli 15.1.6
@schematics/angular 15.1.6
rxjs 7.8.0
typescript 4.9.5

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

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

調査の方向性

リンク先の StackBlitz の再現とその src/theme.scss から始め、フォームフィールドの密度を -4 に設定し、密度 0 と比較してください。密度が -2 以下で matSuffix が存在する場合でも入力テキストが垂直方向に揃ったままになれば完了です。

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

評価

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

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

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