Skip to content

fix(radio): circle not being greyed out when disabled #12127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 12, 2018
Merged
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
33 changes: 19 additions & 14 deletions src/lib/radio/_radio-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,6 @@
border-color: mat-color($foreground, secondary-text);
}

.mat-radio-disabled .mat-radio-outer-circle {
border-color: mat-color($foreground, disabled);
}

.mat-radio-disabled {
.mat-radio-ripple .mat-ripple-element, .mat-radio-inner-circle {
background-color: mat-color($foreground, disabled);
}

.mat-radio-label-content {
color: mat-color($foreground, disabled);
}
}

.mat-radio-button {
&.mat-primary {
@include _mat-radio-color($primary);
Expand All @@ -53,6 +39,25 @@
&.mat-warn {
@include _mat-radio-color($warn);
}

// This needs extra specificity, because the classes above are combined
// (e.g. `.mat-radio-button.mat-accent`) which increases their specificity a lot.
// TODO: consider making the selectors into descendants (`.mat-primary .mat-radio-button`).
&.mat-radio-disabled {
&.mat-radio-checked .mat-radio-outer-circle,
.mat-radio-outer-circle {
border-color: mat-color($foreground, disabled);
}

.mat-radio-ripple .mat-ripple-element,
.mat-radio-inner-circle {
background-color: mat-color($foreground, disabled);
}

.mat-radio-label-content {
color: mat-color($foreground, disabled);
}
}
}
}

Expand Down