bug(MatList): Icons do not respect RTL direction
- 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 MatList in an RTL project, the icons do not adjust their margins correctly based on the text direction (dir="rtl"). The left and right margins remain the same as in LTR mode, causing misalignment in RTL layouts.
I was able to fix this issue easily with custom CSS, but I wanted to report it as a bug in case it needs to be addressed in the library.
### Reproduction
StackBlitz link:
Steps to reproduce:
1.
2.
### Expected Behavior
Icons should switch their margins correctly when dir="rtl" is set.
### Actual Behavior
Icons remain aligned as if the project is LTR, leading to incorrect spacing.
### Environment
Angular: 18
Angular Material: 19.1.5
Browser: Latest version of Chrome
Operating System: Windows (running a Linux dev container on WSL)
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia riproducendo il problema della spaziatura dell’icona di MatList in un progetto Angular 18 usando Angular Material 19.1.5, con dir="rtl" e l’ultima versione di Chrome. Confronta i margini e l’allineamento dell’icona in RTL e LTR; l’issue è completata quando la spaziatura dell’icona segue correttamente la direzione del testo.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- angular, typescript
- Ambito
- frontend, internationalization
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 42/100