Skip to content
This repository was archived by the owner on May 20, 2023. It is now read-only.

Commit c382a28

Browse files
Googlernshahan
authored andcommitted
Update the material toggle mixin to include a grey color when the toggle is disabled.
Without this, the primary color overrides the original grey color when the toggle is simultaneously checked and disabled. PiperOrigin-RevId: 219662292
1 parent 1fc8ced commit c382a28

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

angular_components/lib/material_toggle/_mixins.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
}
2020
}
2121

22-
::ng-deep #{$selector} material-toggle.themeable .material-toggle.checked .tgl-bar {
22+
::ng-deep #{$selector} material-toggle.themeable .material-toggle.checked:not(.disabled) .tgl-bar {
2323
background-color: $primary-color;
2424
}
2525

26-
::ng-deep #{$selector} material-toggle.themeable .material-toggle.checked .tgl-btn {
26+
::ng-deep #{$selector} material-toggle.themeable .material-toggle.checked:not(.disabled) .tgl-btn {
2727
background-color: $primary-color;
2828
}
2929
}

angular_components/lib/material_toggle/material_toggle.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ $vertical-space: $mat-grid * .25;
5757
width: 100%;
5858
}
5959

60-
.material-toggle.checked .tgl-bar {
60+
.material-toggle.checked:not(.disabled) .tgl-bar {
6161
background-color: $default-on-color;
6262
opacity: .5;
6363
}

0 commit comments

Comments
 (0)