From e14fd3f61f61927b4baf7f5d503ec80f2732bcc6 Mon Sep 17 00:00:00 2001 From: Andrew Seguin Date: Wed, 14 Jul 2021 21:00:19 -0600 Subject: [PATCH] fix(material-experimental/mdc-table): apply 500 font weight to headers --- src/material-experimental/mdc-table/_table-theme.scss | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/material-experimental/mdc-table/_table-theme.scss b/src/material-experimental/mdc-table/_table-theme.scss index 3fbf1b73c5df..80e57e65ec99 100644 --- a/src/material-experimental/mdc-table/_table-theme.scss +++ b/src/material-experimental/mdc-table/_table-theme.scss @@ -54,6 +54,15 @@ theming.get-typography-config($config-or-theme)); @include mdc-helpers.mat-using-mdc-typography($config) { @include mdc-data-table.core-styles($query: mdc-helpers.$mat-typography-styles-query); + + // MDC's header cell typography uses the `subtitle-2` config value. Due to legacy reasons, + // this value is mapped from Angular Material's `subheading-1` config value. This is not + // a perfect mapping because the Material spec shows the header having `font-weight: 500` + // instead of `subheading-1`'s default weight of 400. This override makes sure that the + // heading has the expected weight of 500. + .mat-mdc-header-cell { + font-weight: 500; + } } }