From 7ca02495cdfa1635f1fe5496cf1c01ff330126b9 Mon Sep 17 00:00:00 2001 From: Miles Malerba Date: Wed, 16 Feb 2022 22:50:59 +0000 Subject: [PATCH] fix(material-experimental/mdc-list): use body-1 rather than subtitle-1 typography for list items (#24417) * fix(material-experimental/mdc-list): use body-1 rather than subtitle-1 typography for list items * fixup! fix(material-experimental/mdc-list): use body-1 rather than subtitle-1 typography for list items (cherry picked from commit dbcd1404bb1484b49cf5bfd094650a8e7e27c439) --- src/material-experimental/mdc-list/_list-theme.scss | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/material-experimental/mdc-list/_list-theme.scss b/src/material-experimental/mdc-list/_list-theme.scss index 95469ff47000..baab3315f8d6 100644 --- a/src/material-experimental/mdc-list/_list-theme.scss +++ b/src/material-experimental/mdc-list/_list-theme.scss @@ -4,6 +4,7 @@ @use './list-option-theme'; @use '../mdc-helpers/mdc-helpers'; @use '../../material/core/typography/typography'; +@use '../../material/core/typography/typography-utils'; @use '../../material/core/theming/theming'; @@ -55,6 +56,14 @@ @include mdc-list.without-ripple($query: mdc-helpers.$mat-typography-styles-query); @include list-option-theme.private-list-option-typography-styles(); } + + // According to the public spec this should be subtitle-1. + // However, body-1 and subtitle-1 are nearly identical in the public spec, + // and the Google-specific spec states that it should be body-1. + // For consistency, we use body-1 for both public and Google internal. + .mat-mdc-list-item .mdc-list-item__primary-text { + @include typography-utils.typography-level($config, body-1); + } } @mixin theme($theme-or-color-config) {