angular / angular/components

bug(mat-list-item): Color of mat-icon in mat-list does not get applied

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

説明

### Is this a regression?

- [X] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

15.1.6

### Description

Setting the color input on the mat-icon in a mat-list-item does not get applied. The color of the icon gets overridden by the class .mat-mdc-list-item-icon. Before the default color could be overriden.

### Reproduction

Steps to reproduce:
1. Check List example in 15.1.6: https://stackblitz.com/edit/angular-o9oxb4
2. Example in 15.2.2: https://stackblitz.com/edit/angular-wdvemx

### Expected Behavior

Configured color input of mat-icon should be applied.

### Actual Behavior

Configured color input of mat-icon does not get applied and because it gets overriden.

### Environment

- Angular: 15
- CDK/Material: 15.2.2
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): macOS

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

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

調査の方向性

リンクされている StackBlitz List の例から始め、バージョン 15.1.6 と 15.2.2 の間で mat-list-item の動作を比較し、mat-icon の色と .mat-mdc-list-item-icon クラスに注目します。現在のバージョンで、設定した mat-icon の色が 15.1.6 と同じように適用されれば完了です。

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

評価

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

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

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