angular / angular/components

bug(MatList): Icons do not respect RTL direction

Ouverte
#30,537 4 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
area: material/list i18n P3
Langage dominant
TypeScript
Étoiles
25k
Forks
6.8k
Merge moyen
1 j 8 h
PR mergées (30 j)
91

Description

### 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)

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par reproduire le problème d’espacement de l’icône de MatList dans un projet Angular 18 utilisant Angular Material 19.1.5, avec dir="rtl" et la dernière version de Chrome. Comparez les marges et l’alignement de l’icône en RTL et en LTR ; l’issue est terminée lorsque l’espacement de l’icône suit correctement la direction du texte.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
angular, typescript
Domaine
frontend, internationalization
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
42/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.