Skip to content

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

Open
@shhdharmen

Description

@shhdharmen

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

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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: theming

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions