angular / angular/components

bug(badge): Badge doesn't react to the browser font size

Đang mở
#27,828 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Accessibility area: material/badge P3
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?

- [ ] 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 you change the size of the font through the browser settings. The badges remain the same size.

Comparison images:
small
![image](https://github.com/angular/components/assets/3356843/68ca940f-049e-40c7-8a8e-a69e115ba2e1)
large
![image](https://github.com/angular/components/assets/3356843/1381910a-5658-4626-b995-767a6c5f7db1)
chrome option
![image](https://github.com/angular/components/assets/3356843/1b3f7e7d-b571-4fc4-82f2-f028b1858d7d)

### Reproduction

Steps to reproduce:
1. Go in the Chrome options
2. Search for "Font size"
3. Set to "Very small"
4. Go on https://material.angular.io/components/badge/overview
5. Now change to "Very large"
6. Compare again on the doc page

### Expected Behavior

I have a feeling the badges should follow the size of the font.

### Actual Behavior

Badges font remain unchanged between very small or very large font option.

### Environment

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

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

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

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện sự cố trên trang tổng quan badge của Material tại material.angular.io/components/badge/overview, sử dụng cài đặt cỡ chữ của Chrome và so sánh «Rất nhỏ» với «Rất lớn». Công việc được xem là hoàn tất khi phông chữ và kích thước của badge phản hồi nhất quán khi cỡ chữ của trình duyệt thay đổi, và hành vi được xác minh ở cả hai cài đặt.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
angular, typescript
Lĩnh vực
accessibility, frontend
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

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.