angular / angular/components

bug(mat-selection-list): Color attribute on (mat-list-option/mat-icon - matListItemIcon) is ignored on hover.

Abierto
#26,723 8 comentarios 1 reacción 0 asignados Ver en GitHub
area: material/icon area: material/list P3
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

A mat-icon, located inside a mat-list-option, that has the matListItemIcon directive and has color="accent" (or other theming), loses its color when hovered.

Example:
```


play_arrow
{{pr.user.login}}
{{pr.title}}

```

### Reproduction

Steps to reproduce:
1. Add `color="accent"` to a mat-selection-list > mat-list-option > mat-icon (matListItemIcon)
2. Hover the icon.
3. Accent color goes away and is replaced by a default color.

### Expected Behavior

I would expect the accent color on mat-icon to stay when it is hovered. If the issue here is that for accessibility, hovered items need to visually identify, the background of the mat-list-option itself is already doing that.

### Actual Behavior

Theme colors are lost when the mat-list-option is hovered

### Environment

- Angular: 15
- CDK/Material: 15
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con la implementación de Angular Material mat-selection-list y mat-list-option y sus estilos de hover, y luego reproduce el problema usando el ejemplo proporcionado de mat-icon matListItemIcon en Angular/Material 15. Traza qué regla de hover sobrescribe el atributo color del icono y añade o actualiza la prueba relevante del componente si existe; se considera terminado cuando el color de acento permanece visible al pasar el cursor.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
angular, typescript
Área
frontend
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.