angular / angular/components

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

Đang mở
#31,719 10 bình luận 0 reaction 1 người được giao Được @andrewseguin nhận Xem trên GitHub
needs: discussion
Ngôn ngữ chính
TypeScript
Star
25k
Fork
6.8k
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
91

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.