Skip to content

Commit dbcd140

Browse files
authored
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
1 parent 327db93 commit dbcd140

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/material-experimental/mdc-list/_list-theme.scss

+9
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
@use './list-option-theme';
55
@use '../mdc-helpers/mdc-helpers';
66
@use '../../material/core/typography/typography';
7+
@use '../../material/core/typography/typography-utils';
78
@use '../../material/core/theming/theming';
89

910

@@ -55,6 +56,14 @@
5556
@include mdc-list.without-ripple($query: mdc-helpers.$mat-typography-styles-query);
5657
@include list-option-theme.private-list-option-typography-styles();
5758
}
59+
60+
// According to the public spec this should be subtitle-1.
61+
// However, body-1 and subtitle-1 are nearly identical in the public spec,
62+
// and the Google-specific spec states that it should be body-1.
63+
// For consistency, we use body-1 for both public and Google internal.
64+
.mat-mdc-list-item .mdc-list-item__primary-text {
65+
@include typography-utils.typography-level($config, body-1);
66+
}
5867
}
5968

6069
@mixin theme($theme-or-color-config) {

0 commit comments

Comments
 (0)