angular / angular/components

Material Icons are not centered vertically to parent

Ouverte
#18,401 5 commentaires 6 réactions 0 personnes assignées Voir sur GitHub
area: material/button area: material/icon material spec P4
Langage dominant
TypeScript
Étoiles
25k
Forks
6.8k
Merge moyen
1 j 8 h
PR mergées (30 j)
91

Description

#### 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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par la reproduction StackBlitz liée et examinez le comportement de Angular Material button et mat-icon qui y est présenté. Confirmez le problème d’alignement vertical dans les versions indiquées d’Angular et de Material ; le travail est considéré comme terminé lorsque l’icône est centrée verticalement dans son bouton sans casser la reproduction.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
angular, typescript
Domaine
frontend
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
32/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.