@@ -67,10 +67,12 @@ creating a custom theme, you can create a custom **typography configuration**.
6767
6868// Define a custom typography config that overrides the font-family as well as the
6969// `headlines` and `body-1` levels.
70- $custom-typography : mat-typography-config (
71- $font-family : ' Roboto, monospace' ,
72- $headline : mat-typography-level (32px , 48px , 700 ),
73- $body-1 : mat-typography-level (16px , 24px , 500 )
70+ $custom-typography-theme : (
71+ typography : mat-typography-config (
72+ $font-family : ' Roboto, monospace' ,
73+ $headline : mat-typography-level (32px , 48px , 700 ),
74+ $body-1 : mat-typography-level (16px , 24px , 500 )
75+ )
7476);
7577```
7678
@@ -86,21 +88,21 @@ different Sass mixins.
8688
8789``` scss
8890// Override typography CSS classes (e.g., mat-h1, mat-display-1, mat-typography, etc.).
89- @include mat-base-typography ($custom-typography );
91+ @include mat-base-typography ($custom-typography-theme );
9092
9193// Override typography for a specific Angular Material components.
92- @include mat-checkbox-typography ($custom-typography );
94+ @include mat-checkbox-typography ($custom-typography-theme );
9395
9496// Override typography for all Angular Material, including mat-base-typography and all components.
95- @include angular-material-typography ($custom-typography );
97+ @include angular-material-typography ($custom-typography-theme );
9698```
9799
98100If you're using Material's theming, you can also pass in your typography config to the
99101` mat-core ` mixin:
100102
101103``` scss
102104// Override the typography in the core CSS.
103- @include mat-core ($custom-typography );
105+ @include mat-core ($custom-typography-theme );
104106```
105107
106108For more details about the typography functions and default config, see the
0 commit comments