Skip to content

Commit 7370eb9

Browse files
authored
fix(material/chips): missing tokens in M3 (#29531)
Fixes that the chips weren't generating the `with-avatar-avatar-shape-radius` and `elevated-container-color` tokens in M3.
1 parent 98f7301 commit 7370eb9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/material/core/tokens/m3/mdc/_chip.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ $prefix: (mdc, chip);
1818
(
1919
container-shape-radius: token-definition.hardcode(8px, $exclude-hardcoded),
2020
with-avatar-avatar-size: token-definition.hardcode(24px, $exclude-hardcoded),
21+
with-avatar-avatar-shape-radius: token-definition.hardcode(24px, $exclude-hardcoded),
2122
label-text-color: map.get($systems, md-sys-color, on-surface-variant),
2223
disabled-label-text-color: sass-utils.safe-color-change(
2324
map.get($systems, md-sys-color, on-surface),
@@ -43,6 +44,9 @@ $prefix: (mdc, chip);
4344
with-avatar-disabled-avatar-opacity:
4445
token-definition.hardcode(0.38, $exclude-hardcoded),
4546
elevated-selected-container-color: map.get($systems, md-sys-color, secondary-container),
47+
// In the M3 tokens this is a `surface` color, but in the MDC implementation it's
48+
// never being emitted. We emit `transparent` so consumers override the color.
49+
elevated-container-color: token-definition.hardcode(transparent, $exclude-hardcoded),
4650
flat-selected-outline-width: token-definition.hardcode(0, $exclude-hardcoded),
4751
selected-label-text-color: map.get($systems, md-sys-color, on-secondary-container),
4852
flat-disabled-selected-container-color: sass-utils.safe-color-change(

0 commit comments

Comments
 (0)