bug(mat-label): trailing white-space between text and asterisk
- Lingua principale
- TypeScript
- Stelle
- 25k
- Fork
- 6.8k
- Merge medio
- 1g 8h
- PR unite (30g)
- 91
Descrizione
### 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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia dalla riproduzione StackBlitz collegata e confronta il rendering segnalato di mat-label nelle versioni 14–16 di Angular Material. Traccia il componente mat-label e il relativo stile per determinare perché la formattazione HTML influisce sullo spazio prima dell’asterisco. Il lavoro è completato quando un markup dell’etichetta equivalente viene renderizzato senza spazi bianchi finali e un test di regressione copre questo comportamento.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- angular, typescript
- Ambito
- frontend
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100