Skip to content

Commit 3a1b98c

Browse files
committed
feat(material/card): add title-text-color token
Fixes #31080
1 parent c286a94 commit 3a1b98c

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

src/material/card/_m2-card.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ $prefix: (mat, card);
2525
outlined-container-color: inspection.get-theme-color($theme, background, card),
2626
outlined-container-elevation: elevation.get-box-shadow(0),
2727
outlined-outline-color: rgba(inspection.get-theme-color($theme, foreground, base), 0.12),
28+
title-text-color: inspection.get-theme-color($theme, foreground, text),
2829
subtitle-text-color: inspection.get-theme-color($theme, foreground, secondary-text),
2930
filled-container-color: inspection.get-theme-color($theme, background, card),
3031
filled-container-elevation: elevation.get-box-shadow(0)

src/material/card/_m3-card.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ $prefix: (mat, card);
2424
outlined-container-elevation: elevation.get-box-shadow(map.get($system, level0)),
2525
outlined-outline-color: map.get($system, outline-variant),
2626
subtitle-text-color: map.get($system, on-surface),
27+
title-text-color: map.get($system, on-surface),
2728
),
2829
typography: (
2930
subtitle-text-font: map.get($system, title-medium-font),

src/material/card/card.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ $fallbacks: m3-card.get-tokens(m3-system.$theme-with-system-vars);
100100
// Add slots for custom Angular Material card tokens.
101101
@include token-utils.use-tokens($token-prefix, $token-slots, $fallbacks) {
102102
.mat-mdc-card-title {
103+
color: token-utils.slot(title-text-color);
103104
font-family: token-utils.slot(title-text-font);
104105
line-height: token-utils.slot(title-text-line-height);
105106
font-size: token-utils.slot(title-text-size);

0 commit comments

Comments
 (0)