@@ -164,10 +164,20 @@ $kids-typography: mat.define-typography-config(
164
164
165
165
## Using typography styles in your application
166
166
167
- In addition to styles shared between components, the ` core ` mixin includes CSS classes for styling
168
- your application. These CSS classes correspond to the typography levels in your typography config.
169
- This mixin also emits styles for native header elements scoped within the ` .mat-typography ` CSS
170
- class. The table below lists the CSS classes emitted and the native elements styled.
167
+ In addition to styles shared between components, the ` typography-hierarchy ` mixin includes CSS
168
+ classes for styling your application. These CSS classes correspond to the typography levels in your
169
+ typography config. This mixin also emits styles for native header elements scoped within the
170
+ ` .mat-typography ` CSS class.
171
+
172
+ ``` scss
173
+ @use ' @angular/material' as mat ;
174
+
175
+ // Use the default configuration.
176
+ $my-typography : mat .define-typography-config ();
177
+ @include mat .typography-hierarchy ($my-typography );
178
+ ```
179
+
180
+ The table below lists the CSS classes emitted and the native elements styled.
171
181
172
182
| CSS class | Level name | Native elements |
173
183
| ------------------------------------------| ----------------| -----------------|
@@ -194,11 +204,8 @@ typography level. The `.mat-h5` style uses the `body-2` level with the font-size
194
204
195
205
The ` button ` and ` input ` typography levels do not map to CSS classes.
196
206
197
- You can also manually emit the CSS rules for these CSS classes and native elements by calling the ` typography-hierarchy `
198
- mixin. This mixin accepts a typography config and a CSS selector under which the styles are scopes (defaulting to
199
- ` .mat-typography ` ).
200
-
201
- The following example demonstrates usage of the typography styles emitted by the ` core ` mixin.
207
+ The following example demonstrates usage of the typography styles emitted by the
208
+ ` typography-hierarchy ` mixin.
202
209
203
210
``` html
204
211
<body >
0 commit comments