bug(mat-form-field): suffix element style should reflect input disabled state
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
### Reproduction
[Open this StackBlitz](https://stackblitz.com/edit/components-issue-8gvvrn?file=src/app/example-component.html) and toggle the Disabled state with the checkbox.
### Expected Behavior
Per [the Text Field spec](https://material.io/components/text-fields#outlined-text-field), under "Outlined text field with suffix text", a suffix in a disabled text field should use the same font (weight / color / opacity) as the wrapped input element.

(In the image from the spec, "55" is the input text and "/100" is the suffix.)
### Actual Behavior
The input text is light gray, to indicate that the input is disabled, but the suffix styling does not change, so it doesn't match the input text.
### Environment
- Angular: 11.1
- CDK/Material: 11.1
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows
### Note
I also see that in all the suffix examples where the input is *not* disabled, the suffix is styled slightly lighter than the input text. As you can see in the StackBlitz, the default suffix is exactly the same as the input text. The spec doesn't explicitly require this, as far as I can see, so maybe it's just a suggestion?
コントリビューションガイド
調査の方向性
リンクされたStackBlitzの再現を使用し、src/app/example-component.htmlから始めて、チェックボックスを切り替え、無効化されたinputとsuffixを比較します。mat-form-fieldのsuffixのスタイルを追跡し、suffixが無効化されたinputのfont weight、color、opacityと一致することを確認するとともに、無効化されていない場合の動作を維持します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100