Skip to content

Commit 25a6c9b

Browse files
committed
fix(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 447f2e6 commit 25a6c9b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/material/radio/_radio-theme.scss

+6
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626
border-color: mat-color($foreground, secondary-text);
2727
}
2828

29+
.mat-radio-label-content {
30+
// Explicitly set the text color since the radio button may be
31+
// inside an overlay that doesn't have the proper theme text color.
32+
color: mat-color($foreground, 'text');
33+
}
34+
2935
.mat-radio-button {
3036
&.mat-primary {
3137
@include _mat-radio-color($primary);

0 commit comments

Comments
 (0)