angular / angular/components

bug(theming): There is no way to read density scale from theme

Đang mở
#30,236 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
area: theming 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?

- [x] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

18

### Description

In Angular Material 18, developers could use Angular Material's theme's density scale, so that their custom components aligns with other Angular Material components.

In v18, developers could use `mat.get-theme-density($theme);` to get the scale. [Link to docs](https://v18.material.angular.io/guide/theming-your-components#reading-the-density-scale).

In v19, it's not clear how to get density scale from theme.

### Reproduction

Not needed.

### Expected Behavior

Developers should be able to read density scale in Angular Material 19.

### Actual Behavior

Developers are not able to read density scale in Angular Material 19.

### Environment

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

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 so sánh điểm bắt đầu “reading the density scale” trong hướng dẫn theming của Angular Material v18 với API theming của v19. Xác định cách thang mật độ được biểu diễn trong theme v19 và cung cấp một cách tương đương để các component tùy chỉnh đọc giá trị này. Công việc được xem là hoàn tất khi các developer có thể lấy thang mật độ của theme trong Angular Material 19.

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
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
45/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.