From c13eb5d411424d1aa47845fa4a2ce6d4d1533a99 Mon Sep 17 00:00:00 2001 From: Andrew Seguin Date: Mon, 26 Sep 2022 15:09:45 -0600 Subject: [PATCH] feat(material/core): add option to disable core typography --- src/material/core/_core.scss | 8 ++++++-- src/material/legacy-core/_core.scss | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/material/core/_core.scss b/src/material/core/_core.scss index a77709e9ac8e..e529a452fcee 100644 --- a/src/material/core/_core.scss +++ b/src/material/core/_core.scss @@ -6,8 +6,12 @@ @use './typography/all-typography'; // Mixin that renders all of the core styles that are not theme-dependent. -@mixin core($typography-config: null) { - @include all-typography.all-component-typographies($typography-config); +// TODO: Remove the `$exclude-typography` parameter once `ng update` automatically migrates +// client theme applications to manually include the typography mixin. +@mixin core($typography-config: null, $exclude-typography: false) { + @if not $exclude-typography { + @include all-typography.all-component-typographies($typography-config); + } @include ripple.ripple(); @include cdk.a11y-visually-hidden(); @include cdk.overlay(); diff --git a/src/material/legacy-core/_core.scss b/src/material/legacy-core/_core.scss index b6612434b34e..9e6057509b8c 100644 --- a/src/material/legacy-core/_core.scss +++ b/src/material/legacy-core/_core.scss @@ -7,10 +7,14 @@ @use '../core/focus-indicators/private'; // Mixin that renders all of the core styles that are not theme-dependent. +// TODO: Remove the `$exclude-typography` parameter once `ng update` automatically migrates +// client theme applications to manually include the typography mixin. /// @deprecated Use `mat.core` instead. See https://material.angular.io/guide/mdc-migration for information about migrating. /// @breaking-change 17.0.0 -@mixin core($typography-config: null) { - @include all-typography.all-legacy-component-typographies($typography-config); +@mixin core($typography-config: null, $exclude-typography: false) { + @if not $exclude-typography { + @include all-typography.all-legacy-component-typographies($typography-config); + } @include ripple.ripple(); @include cdk.a11y-visually-hidden(); @include cdk.overlay();