angular / angular/components

bug(Material): Button theme-overrrides typography not working

Abierto
#31,719 10 comentarios 0 reacciones 1 asignado Reclamado por @andrewseguin Ver en GitHub
needs: discussion
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

20.1.3

### Description

@andrewseguin I reported this issue before: https://github.com/angular/components/issues/31191

My button filled is not getting the override of label-large since I upgraded to v20.1.7.

### Reproduction

I have:

@include mat.theme-overrides((
...
label-large: 600 1.25rem/1.5rem 'Inter Tight',
// for buttons above line doesnt work, not sure anymore where this was happening
label-large-font: 'Inter Tight',
label-large-size: 1.25rem,
label-large-line-height: 1.5rem,
label-large-weight: 600,
...
))

This worked for angular 20.1.3 and below.
label-large works for any component using label-large but for buttons it needed to be defined separately to override the buttons font size.

After upgrading to 20.1.7 none of these overrides work anymore.
--mat-sys-label-large-size is now 0.875 and not 1.25 rem.

The only way I can change the size is using
```
mat.button-overrides((
filled-label-text-size: 1.25rem
))
```
affects --mat-button-filled-label-text-size

### Expected Behavior

I expect --mat-sys-label-large-size to be 1.25.

### Actual Behavior

After upgrading to 20.1.7 none of these overrides work anymore.
--mat-sys-label-large-size is now 0.875 and not 1.25 rem.

### Environment

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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.