bug(MatList): Icons do not respect RTL direction
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
### 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)
Beitragsleitfaden
Rechercherichtung
Beginne damit, das Problem mit dem Abstand des MatList-Symbols in einem Angular-18-Projekt mit Angular Material 19.1.5, mit dir="rtl" und der neuesten Chrome-Version zu reproduzieren. Vergleiche die Symbolabstände und die Ausrichtung in RTL und LTR; das Issue ist abgeschlossen, wenn der Symbolabstand korrekt der Textrichtung folgt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- frontend, internationalization
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 42/100