Skip to content

Commit 9549dc3

Browse files
committed
fix(material/radio): color tokens excluded when passing in variant
Fixes that when passing in a variant into the radio button's `get-tokens` function, we were removing the color tokens altogether, because passing in multiple arguments into `map.remove` removes all those keys, rather than removing a nested value. Fixes #31319.
1 parent 029e39c commit 9549dc3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/material/radio/_m3-radio.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@
4747
// Temporary removal where color variants previously did not include the
4848
// unselected icon color. Remove this and approve internal screenshot changes.
4949
@if $color-variant {
50-
$tokens: map.remove($tokens, color, radio-unselected-icon-color);
50+
$color-tokens: map.get($tokens, color);
51+
$color-tokens: map.remove($color-tokens, radio-unselected-icon-color);
52+
$tokens: map.set($tokens, color, $color-tokens);
5153
}
5254

5355
@return $tokens;

0 commit comments

Comments
 (0)