Skip to content

Commit 47936ec

Browse files
committed
fix(material/radio): incorrect text color when placed inside an overlay with a dark theme
Fixes a similar issue to #18742. The radio button inherits its text color from the closest parent which may not be correct once the element is moved out into an overlay.
1 parent 76186ad commit 47936ec

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/material/radio/_radio-theme.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@
2828
border-color: theming.get-color-from-palette($foreground, secondary-text);
2929
}
3030

31+
.mat-radio-label-content {
32+
// Explicitly set the text color since the radio button may be
33+
// inside an overlay that doesn't have the proper theme text color.
34+
color: theming.get-color-from-palette($foreground, 'text');
35+
}
36+
3137
.mat-radio-button {
3238
&.mat-primary {
3339
@include _color($primary);

0 commit comments

Comments
 (0)