Skip to content

Commit 32827ac

Browse files
committed
fix(material/schematics): migrate typography-hierarchy mixin to legacy
Updates the config so that the `typography-hierarchy` mixin is migrated to `legacy-typography-hierarchy`. (cherry picked from commit 1430d8e)
1 parent 169bc2e commit 32827ac

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

integration/mdc-migration/golden/src/styles.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
// Be sure that you only ever include this mixin once!
1010
@include mat.all-component-typographies(mat.define-typography-config());
1111
@include mat.core();
12+
@include mat.typography-hierarchy(mat.define-typography-config(
13+
$headline-1: mat.define-typography-level(42px, 42px, 100)
14+
), '.custom-typography');
1215

1316
// Define the palettes for your theme using the Material Design palettes available in palette.scss
1417
// (imported above). For each palette, you can optionally specify a default, lighter, and darker

integration/mdc-migration/sample-project/src/styles.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
// Be sure that you only ever include this mixin once!
1010
@include mat.all-legacy-component-typographies(mat.define-legacy-typography-config());
1111
@include mat.legacy-core();
12+
@include mat.legacy-typography-hierarchy(mat.define-legacy-typography-config(
13+
$display-4: mat.define-typography-level(42px, 42px, 100)
14+
), '.custom-typography');
1215

1316
// Define the palettes for your theme using the Material Design palettes available in palette.scss
1417
// (imported above). For each palette, you can optionally specify a default, lighter, and darker

src/material/schematics/ng-update/migrations/legacy-components-v15/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ export const CUSTOM_SASS_MIXIN_RENAMINGS: {[key: string]: string} = {
103103
'all-component-colors': 'all-legacy-component-colors',
104104
'all-component-typographies': 'all-legacy-component-typographies',
105105
'private-all-component-densities': 'private-all-legacy-component-densities',
106+
'typography-hierarchy': 'legacy-typography-hierarchy',
106107
};
107108

108109
export const CUSTOM_SASS_FUNCTION_RENAMINGS: {[key: string]: string} = {

0 commit comments

Comments
 (0)