bug(theming): There is no way to read density scale from theme
- Dominant language
- TypeScript
- Stars
- 25k
- Forks
- 6.8k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 91
Description
### 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
Contributor guide
Research direction
Start by comparing the Angular Material v18 theming guide's “reading the density scale” entry point with the v19 theming API. Determine how the density scale is represented in the v19 theme and expose an equivalent way for custom components to read it. Done means developers can retrieve the theme density scale in Angular Material 19.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100