bug(mat-label): trailing white-space between text and asterisk
- Langage dominant
- TypeScript
- Étoiles
- 25k
- Forks
- 6.8k
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 91
Description
### 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
14
### Description
It's all in the title.
Might be related to https://github.com/angular/components/issues/27722.
### Reproduction
https://stackblitz.com/edit/vcau9e
### Expected Behavior
White-space should be trimmed (e. g. by making mat-label `display: inline-block`).
### Actual Behavior
I see UI being dependent on html formatting.
### Environment
```
Angular CLI: 16.2.9
Node: 18.12.0
Package Manager: yarn 1.22.19
OS: win32 x64
Angular: 16.2.12
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router, service-worker
Package Version
------------------------------------------------------------
@angular-devkit/architect 0.1602.9
@angular-devkit/build-angular 16.2.9
@angular-devkit/core 16.2.9
@angular-devkit/schematics 16.2.9
@angular/cdk 16.2.11
@angular/cli 16.2.9
@angular/fire 7.6.1
@angular/material 16.2.11
@angular/material-moment-adapter 16.2.11
@schematics/angular 16.2.9
rxjs 7.8.1
typescript 5.1.6
webpack 5.89.0
zone.js 0.13.3
```
Also reproducible in version 15.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par la reproduction StackBlitz liée et comparez le rendu signalé de mat-label dans les versions 14–16 d’Angular Material. Suivez le composant mat-label et son style afin de déterminer pourquoi le formatage HTML affecte l’espace avant l’astérisque. Le travail est terminé lorsqu’un balisage de label équivalent est rendu sans espace blanc final et qu’un test de régression couvre ce comportement.
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
- 35/100