Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/material-experimental/mdc-checkbox/_checkbox-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
$primary: mat.get-color-from-palette(map.get($config, primary));
$accent: mat.get-color-from-palette(map.get($config, accent));
$warn: mat.get-color-from-palette(map.get($config, warn));
$foreground: map.get($config, foreground);

@include mat.private-using-mdc-theme($config) {
.mat-mdc-checkbox {
Expand Down Expand Up @@ -64,6 +65,11 @@
@include _selected-ripple-colors($warn, error);
}
}

.mat-mdc-checkbox-disabled label {
// MDC should set the disabled color on the label, but doesn't, so we do it here instead.
color: mat.get-color-from-palette($foreground, disabled-text);
}
}
}

Expand Down
6 changes: 6 additions & 0 deletions src/material-experimental/mdc-radio/_radio-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
$primary: mat.get-color-from-palette(map.get($config, primary));
$accent: mat.get-color-from-palette(map.get($config, accent));
$warn: mat.get-color-from-palette(map.get($config, warn));
$foreground: map.get($config, foreground);

@include mat.private-using-mdc-theme($config) {
$on-surface: rgba(mdc-theme-color.$on-surface, 0.54);
Expand All @@ -46,6 +47,11 @@

--mat-mdc-radio-ripple-color: #{mdc-theme-color.prop-value(on-surface)};

// MDC should set the disabled color on the label, but doesn't, so we do it here instead.
.mdc-radio--disabled + label {
color: mat.get-color-from-palette($foreground, disabled-text);
}

&.mat-primary {
@include _color-palette($primary);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
$accent: mat.get-color-from-palette(map.get($config, accent));
$warn: mat.get-color-from-palette(map.get($config, warn));
$is-dark: map.get($config, is-dark);
$foreground: map.get($config, foreground);

@include mat.private-using-mdc-theme($config) {
// MDC's switch doesn't support a `color` property. We add support
Expand All @@ -81,6 +82,11 @@
@include mdc-form-field.core-styles($query: mat.$private-mdc-theme-styles-query);
@include mdc-switch-theme.theme(_get-theme-base-map($is-dark));

// MDC should set the disabled color on the label, but doesn't, so we do it here instead.
.mdc-switch--disabled + label {
color: mat.get-color-from-palette($foreground, disabled-text);
}

&.mat-primary {
@include mdc-switch-theme.theme(_get-theme-color-map($primary));
}
Expand Down