angular / angular/components

bug(form-field): Outlined form-field should have enough space to contain floating label

Aperta
#31,422 1 commento 2 reazioni 0 assegnatari Vedi su GitHub
area: material/form-field P4
Lingua principale
TypeScript
Stelle
25k
Fork
6.8k
Merge medio
1g 8h
PR unite (30g)
91

Descrizione

### Is this a regression?

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

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

_No response_

### Description

When using `outline` appearance for `mat-form-field`, the floating label overflows out of component itself. The `mat-form-field` component should have enough space on top to contain floating label. See below screenshot for reference:

Image

### Reproduction

StackBlitz link: https://stackblitz.com/edit/rxp9hmcc?file=src%2Fexample%2Fform-field-appearance-example.html

### Expected Behavior

The `mat-form-field` component should have enough space (margin) on top to contain floating label.

### Actual Behavior

The `mat-form-field` component does not have enough space (margin) on top to contain floating label.

### Environment

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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia dalla riproduzione StackBlitz collegata e dal relativo esempio di aspetto del campo del modulo, quindi esamina il layout e gli stili del mat-form-field outlined di Angular Material coinvolti nell’etichetta flottante. Il lavoro è completato quando il componente outlined fornisce spazio sufficiente nella parte superiore per l’etichetta flottante senza overflow nella configurazione segnalata con Angular 20, Chrome e macOS.

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
48/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.