Skip to content

Commit 8327351

Browse files
committed
feat(material/card): add title-text-color token
Fixes angular#31080
1 parent 9c018d1 commit 8327351

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
@@ -20,6 +20,7 @@
2020
card-outlined-container-color: inspection.get-theme-color($theme, background, card),
2121
card-outlined-container-elevation: elevation.get-box-shadow(0),
2222
card-outlined-outline-color: rgba(inspection.get-theme-color($theme, foreground, base), 0.12),
23+
card-title-text-color: inspection.get-theme-color($theme, foreground, text),
2324
card-subtitle-text-color: inspection.get-theme-color($theme, foreground, secondary-text),
2425
card-filled-container-color: inspection.get-theme-color($theme, background, card),
2526
card-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
@@ -25,6 +25,7 @@ $prefix: (mat, card);
2525
card-outlined-container-elevation: elevation.get-box-shadow(map.get($system, level0)),
2626
card-outlined-outline-color: map.get($system, outline-variant),
2727
card-subtitle-text-color: map.get($system, on-surface),
28+
card-title-text-color: map.get($system, on-surface),
2829
),
2930
typography: (
3031
card-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
@@ -91,6 +91,7 @@ $fallbacks: m3-card.get-tokens();
9191

9292
// Add slots for custom Angular Material card tokens.
9393
.mat-mdc-card-title {
94+
color: token-utils.slot(card-title-text-color, $fallbacks);
9495
font-family: token-utils.slot(card-title-text-font, $fallbacks);
9596
line-height: token-utils.slot(card-title-text-line-height, $fallbacks);
9697
font-size: token-utils.slot(card-title-text-size, $fallbacks);

0 commit comments

Comments
 (0)