angular / angular/components

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

未关闭
#30,236 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area: theming P3
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 8 小时
30 天内合并 PR
91

描述

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

贡献指南

打开贡献指南

调研方向

首先,将 Angular Material v18 主题指南中的“reading the density scale”入口点与 v19 主题 API 进行比较。确定密度刻度在 v19 主题中的表示方式,并为自定义组件提供一种等效的读取方式。完成的标准是开发者可以在 Angular Material 19 中获取主题密度刻度。

由索引模型根据 Issue 内容生成。

评估

技术栈
angular, typescript
领域
frontend
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。