Checkboxes with long labels
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 65/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- angular, scss, typescript
- Ambito
- frontend
Direzione di ricerca
Inizia in checkbox-theme.scss intorno alla riga 88 e riproduci una casella di controllo con un’etichetta lunga all’interno di una scheda o di un elemento contenitore simile. Controlla le regole tipografiche e di layout esistenti rispetto all’overflow segnalato, quindi verifica che le etichette lunghe vadano a capo su più righe, con la casella di controllo allineata verticalmente a sinistra.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Bug, feature request, or proposal:
Bug?
What is the expected behavior?
Checkboxes with long labels won't word wrap (as it did in earlier versions). (see bottom part of attacjed image)
What is the current behavior?
The labels of checkboxes will overflow the containing element. (see top part of attached image) The problem appeared when I upgraded to Angular 5 from 4-something and I pushed up material at the same time. It's possible this behavior was introduced in an earlier version of material than the latest.
What are the steps to reproduce?
Just make a checkbox with a long label inside a card or something.
What is the use-case or motivation for changing an existing behavior?
I have a checkbox on a login-page with a long text-string about the user agreeing on this and that. When wrapped it's about three lines with the checkbox vertically aligned on the left side.
Is there anything else we should know?
I solved it locally by altering _checkbox-theme.scss from line 88:
@mixin mat-checkbox-typography($config) {
.mat-checkbox {
font-family: mat-font-family($config);
}
.mat-checkbox-label { // NEW
white-space: initial; // NEW
} // NEW
// TODO(kara): Remove this style when fixing vertical baseline
.mat-checkbox-layout .mat-checkbox-label {
line-height: mat-line-height($config, body-2);
}
}

- Lingua principale
- TypeScript
- Stelle
- 25k
- Fork
- 6.8k
- Merge medio
- 1g 2h
- PR unite (30g)
- 80
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di angular/components
-
area: material/tree docs gemini-triaged needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
angular/components#33832 ·
-
area: material/datepicker gemini-triaged P4
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
angular/components#33763 · 2 commenti · 3 reazioni ·
-
area: material/table gemini-triaged P4
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
angular/components#33709 · 1 commento ·
-
area: material/table docs gemini-triaged P4
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
angular/components#33455 ·
-
area: material/core gemini-triaged P3
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
angular/components#33059 · 2 commenti ·
Tutte le issue di angular/components
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
safetrustcr/dApp-SafeTrust#426 ·
-
area:workflow bug ready-for-agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
fil-donadoni/tolaria#4409 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Fission-AI/OpenSpec#1960 ·
-
Add dependabot Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
corsairdev/corsair#1764 ·