Skip to content

Commit

Permalink
feat(material/core): add option to disable core typography (#25706)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewseguin committed Sep 27, 2022
1 parent 4da27d5 commit 73ef52c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/material/core/_core.scss
Expand Up @@ -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();
Expand Down
8 changes: 6 additions & 2 deletions src/material/legacy-core/_core.scss
Expand Up @@ -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();
Expand Down

0 comments on commit 73ef52c

Please sign in to comment.