File tree Expand file tree Collapse file tree 3 files changed +17
-15
lines changed Expand file tree Collapse file tree 3 files changed +17
-15
lines changed Original file line number Diff line number Diff line change 88 background : mat-color ($background , card );
99 color : mat-color ($foreground , text );
1010
11- .mat-option {
12- // Selected options in autocompletes should not be gray, but we
13- // only want to override the background for selected options if
14- // they are *not* in hover or focus state. This change has to be
15- // made here because base option styles are shared between the
16- // autocomplete and the select.
17- & .mat-selected :not (.mat-active ):not (:hover ) {
18- background : mat-color ($background , card );
11+ // Selected options in autocompletes should not be gray, but we
12+ // only want to override the background for selected options if
13+ // they are *not* in hover or focus state. This change has to be
14+ // made here because base option styles are shared between the
15+ // autocomplete and the select.
16+ .mat-option.mat-selected :not (.mat-active ):not (:hover ) {
17+ background : mat-color ($background , card );
18+
19+ & :not (.mat-option-disabled ) {
1920 color : mat-color ($foreground , text );
2021 }
2122 }
Original file line number Diff line number Diff line change 1212 .mat-option {
1313 color : mat-color ($foreground , text );
1414
15- & :hover:not (.mat-option-disabled ), & :focus:not (.mat-option-disabled ) {
15+ & :hover:not (.mat-option-disabled ),
16+ & :focus:not (.mat-option-disabled ) {
1617 background : mat-color ($background , hover );
1718 }
1819
19- .mat-primary & .mat-selected {
20+ .mat-primary & .mat-selected :not ( .mat-option-disabled ) {
2021 color : mat-color ($primary );
2122 }
2223
23- .mat-accent & .mat-selected {
24+ .mat-accent & .mat-selected :not ( .mat-option-disabled ) {
2425 color : mat-color ($accent );
2526 }
2627
27- .mat-warn & .mat-selected {
28+ .mat-warn & .mat-selected :not ( .mat-option-disabled ) {
2829 color : mat-color ($warn );
2930 }
3031
3132 // In multiple mode there is a checkbox to show that the option is selected.
32- & .mat-selected :not (.mat-option-multiple ) {
33+ & .mat-selected :not (.mat-option-multiple ):not ( .mat-option-disabled ) {
3334 background : mat-color ($background , hover );
3435 }
3536
Original file line number Diff line number Diff line change 11< span [ngSwitch] ="_isCompatibilityMode " *ngIf ="multiple ">
22 < mat-pseudo-checkbox class ="mat-option-pseudo-checkbox " *ngSwitchCase ="true "
3- [state] ="selected ? 'checked' : '' "> </ mat-pseudo-checkbox >
3+ [state] ="selected ? 'checked' : '' " [disabled] =" disabled " > </ mat-pseudo-checkbox >
44 < md-pseudo-checkbox class ="mat-option-pseudo-checkbox " *ngSwitchDefault
5- [state] ="selected ? 'checked' : '' "> </ md-pseudo-checkbox >
5+ [state] ="selected ? 'checked' : '' " [disabled] =" disabled " > </ md-pseudo-checkbox >
66</ span >
77
88< ng-content > </ ng-content >
You can’t perform that action at this time.
0 commit comments