Skip to content

Commit 73ef52c

Browse files
authored
feat(material/core): add option to disable core typography (#25706)
1 parent 4da27d5 commit 73ef52c

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

src/material/core/_core.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@
66
@use './typography/all-typography';
77

88
// Mixin that renders all of the core styles that are not theme-dependent.
9-
@mixin core($typography-config: null) {
10-
@include all-typography.all-component-typographies($typography-config);
9+
// TODO: Remove the `$exclude-typography` parameter once `ng update` automatically migrates
10+
// client theme applications to manually include the typography mixin.
11+
@mixin core($typography-config: null, $exclude-typography: false) {
12+
@if not $exclude-typography {
13+
@include all-typography.all-component-typographies($typography-config);
14+
}
1115
@include ripple.ripple();
1216
@include cdk.a11y-visually-hidden();
1317
@include cdk.overlay();

src/material/legacy-core/_core.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@
77
@use '../core/focus-indicators/private';
88

99
// Mixin that renders all of the core styles that are not theme-dependent.
10+
// TODO: Remove the `$exclude-typography` parameter once `ng update` automatically migrates
11+
// client theme applications to manually include the typography mixin.
1012
/// @deprecated Use `mat.core` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
1113
/// @breaking-change 17.0.0
12-
@mixin core($typography-config: null) {
13-
@include all-typography.all-legacy-component-typographies($typography-config);
14+
@mixin core($typography-config: null, $exclude-typography: false) {
15+
@if not $exclude-typography {
16+
@include all-typography.all-legacy-component-typographies($typography-config);
17+
}
1418
@include ripple.ripple();
1519
@include cdk.a11y-visually-hidden();
1620
@include cdk.overlay();

0 commit comments

Comments
 (0)