Open
Description
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
Documentation about define-theme seems to be outdated.
@use '@angular/material' as mat;
html {
@include mat.theme((
color: mat.$violet-palette,
typography: Roboto,
density: -2,
));
}
Reproduction
You can check at:
https://material.angular.io/guide/theming#density
Expected Behavior
The corret code should be:
$theme: mat.define-theme(
(
color: (
primary: mat.$azure-palette,
tertiary: mat.$violet-palette,
theme-type: light,
),
density: (
scale: -2,
),
)
);
Actual Behavior
This code results in the following error:
$config.density should be a density configuration object.
I believe this error also occours with typography config.
Environment
- Angular: 19
- CDK/Material: 19