bug(MatList): Icons do not respect RTL direction
- Lenguaje dominante
- TypeScript
- Estrellas
- 25k
- Forks
- 6.8k
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 91
Descripción
### 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)
Guía de contribución
Línea de trabajo
Comienza reproduciendo el problema del espaciado del icono de MatList en un proyecto de Angular 18 usando Angular Material 19.1.5, con dir="rtl" y la última versión de Chrome. Compara los márgenes y la alineación del icono en RTL y LTR; el issue está terminado cuando el espaciado del icono sigue correctamente la dirección del texto.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- angular, typescript
- Área
- frontend, internationalization
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 42/100