bug(MatTable): Text-color are no longer taken from the predefined foreground palette
- 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?
- [X] Yes, this behavior used to work in the previous version
### The previous version in which this bug was not present was
14
### Description
After the angular material 15 update, the component text colors are no longer taken from the predefined foreground palette. In the past there was taken from the text and secondary-text variable.
Is there a new smart way to force the use of specific text-colors? Or is it not advisable to use your own font colors?
### Reproduction
https://stackblitz.com/run?file=src%2Fapp%2Ftable-basic-example.ts
### Expected Behavior
Its possible to use the foreground color palette to customize the text-color.
```scss
$theme-foreground-palette: (
base: color.$grey-700,
divider: color.$dividers,
dividers: color.$dividers,
disabled: color.$disabled-text,
disabled-button: color.$grey-400,
disabled-text: color.$disabled-text,
elevation: color.$grey-700,
hint-text: color.$disabled-text,
secondary-text: color.$secondary-text, // <-- was also used for mat-header-cells
icon: color.$primary-text,
icons: color.$primary-text,
text: color.$primary-text, // <-- was also used for mat-cells
slider-min: color.$grey-700,
slider-off: color.$grey-200,
slider-off-active: color.$grey-300,
);
```
### Actual Behavior
Some parts from the foreground palette will affect in the theme for the app. But in lists, tables or options there is always used the color `rgba(0, 0, 0, 0.87)`.
### Environment
- Angular: 15.0.2
- CDK/Material: 15.0.1
Guía de contribución
Línea de trabajo
Comienza con la reproducción vinculada de StackBlitz, especialmente con src/app/table-basic-example.ts, y compara el comportamiento de los temas de Angular Material 14 y 15. Rastrea cómo los valores de texto y texto secundario de la paleta de primer plano llegan a las celdas y los encabezados de la tabla; se considera completado cuando la paleta configurada controla esos colores en lugar de rgba(0, 0, 0, 0.87).
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
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 38/100