angular / angular/components

Material Icons are not centered vertically to parent

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

説明

#### Reproduction

https://stackblitz.com/edit/angular-tzta8m

You will see that mat-icon is not centered vertically in button element.

#### Expected Behavior

Should be centered vertically, too.

#### Actual Behavior

Not centered, not so fancy.

#### Environment

- Angular, CDK/Material from Stackblitz:

```
"@angular/animations": "^8.2.9",
"@angular/cdk": "~8.2.2",
"@angular/common": "^8.2.9",
"@angular/compiler": "^8.2.9",
"@angular/core": "^8.2.9",
"@angular/forms": "^8.2.9",
"@angular/material": "~8.2.2",
"@angular/material-moment-adapter": "~8.2.2",
"@angular/platform-browser": "^8.2.9",
"@angular/platform-browser-dynamic": "^8.2.9",
"@angular/router": "^8.2.9",
"hammerjs": "^2.0.8",
"@angular-devkit/build-angular": "^0.803.8",
"@angular/cli": "^8.3.8",
"@angular/compiler-cli": "^8.2.9",
"@angular/language-service": "^8.2.9",
```

- Browser(s): Chrome Version 79.0.3945.130 (Official Build) (64-bit)
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 10 Enterprise 1903

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

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

調査の方向性

リンクされている StackBlitz の再現環境から始め、そこで示されている Angular Material button と mat-icon の動作を調査してください。指定された Angular と Material のバージョンで垂直方向の配置の問題を確認してください。ボタン内でアイコンが垂直方向に中央揃えされ、再現環境を壊していなければ完了です。

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

評価

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

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

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