Skip to content

Commit cc9793f

Browse files
authored
fix(material-experimental/radio): redefine theme variables (#18907)
1 parent 1cca459 commit cc9793f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/material-experimental/mdc-radio/_radio-theme.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
@import '../mdc-helpers/mdc-helpers';
22
@import '@material/radio/mixins';
33
@import '@material/radio/variables';
4+
@import '@material/theme/functions.import';
45

56
@mixin mat-mdc-radio-theme($theme) {
67
// Save original values of MDC global variables. We need to save these so we can restore the
78
// variables to their original values and prevent unintended side effects from using this mixin.
89
$orig-mdc-radio-baseline-theme-color: $mdc-radio-baseline-theme-color;
10+
$orig-mdc-radio-unchecked-color: $mdc-radio-unchecked-color;
11+
$orig-mdc-radio-disabled-circle-color: $mdc-radio-disabled-circle-color;
912

1013
@include mat-using-mdc-theme($theme) {
1114
$mdc-radio-baseline-theme-color: primary !global;
15+
$mdc-radio-unchecked-color: rgba(mdc-theme-prop-value(on-surface), 0.54) !global;
16+
$mdc-radio-disabled-circle-color: rgba(mdc-theme-prop-value(on-surface), 0.38) !global;
1217

1318
.mat-mdc-radio-button {
1419
&.mat-primary {
@@ -29,6 +34,8 @@
2934

3035
// Restore original values of MDC global variables.
3136
$mdc-radio-baseline-theme-color: $orig-mdc-radio-baseline-theme-color !global;
37+
$mdc-radio-unchecked-color: $orig-mdc-radio-unchecked-color !global;
38+
$mdc-radio-disabled-circle-color: $orig-mdc-radio-disabled-circle-color !global;
3239
}
3340

3441
@mixin mat-mdc-radio-typography($config) {

0 commit comments

Comments
 (0)