Skip to content

Commit

Permalink
fix(material-experimental/mdc-list): use body-1 rather than subtitle-…
Browse files Browse the repository at this point in the history
…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 dbcd140)
  • Loading branch information
mmalerba committed Feb 16, 2022
1 parent aaae40f commit 7ca0249
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/material-experimental/mdc-list/_list-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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';


Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 7ca0249

Please sign in to comment.