File tree Expand file tree Collapse file tree 2 files changed +12
-28
lines changed
src/material/schematics/ng-add Expand file tree Collapse file tree 2 files changed +12
-28
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ describe('ng-add schematic', () => {
124124 const themeContent = buffer ! . toString ( ) ;
125125
126126 expect ( themeContent ) . toContain ( `@use '@angular/material' as mat;` ) ;
127- expect ( themeContent ) . toContain ( `$material-theme: mat.define- theme((` ) ;
127+ expect ( themeContent ) . toContain ( `@include mat.theme((` ) ;
128128 } ) ;
129129
130130 it ( 'should create a custom theme file if no SCSS file could be found' , async ( ) => {
Original file line number Diff line number Diff line change @@ -12,32 +12,16 @@ export function createCustomTheme(name: string = 'app') {
1212// Custom Theming for Angular Material
1313// For more information: https://material.angular.io/guide/theming
1414@use '@angular/material' as mat;
15- // Plus imports for other components in your app.
1615
17- // Define the theme object.
18- $${ name } -theme: mat.define-theme((
19- color: (
20- theme-type: light,
21- primary: mat.$azure-palette,
22- tertiary: mat.$blue-palette,
23- ),
24- density: (
25- scale: 0,
26- )
27- ));
28-
29- // Include theme styles for core and each component used in your app.
30- // Alternatively, you can import and @include the theme mixins for each component
31- // that you are using.
32- :root {
33- @include mat.all-component-themes($${ name } -theme);
34- }
35-
36- // Comment out the line below if you want to use the pre-defined typography utility classes.
37- // For more information: https://material.angular.io/guide/typography#using-typography-styles-in-your-application.
38- // @include mat.typography-hierarchy($${ name } -theme);
39-
40- // Comment out the line below if you want to use the deprecated \`color\` inputs.
41- // @include mat.color-variants-backwards-compatibility($${ name } -theme);
42- ` ;
16+ html {
17+ @include mat.theme((
18+ color: (
19+ theme-type: light,
20+ primary: mat.$azure-palette,
21+ tertiary: mat.$blue-palette,
22+ ),
23+ typography: Roboto,
24+ density: 0,
25+ ));
26+ }` ;
4327}
You can’t perform that action at this time.
0 commit comments