是否可以更改已选中复选框(mat-pseudo-checkbox-checked)的默认颜色:
<mat-selection-list #shoes>
<mat-list-option *ngFor="let shoe of typesOfShoes">
{{shoe}}
</mat-list-option>
</mat-selection-list>
我试过了:
.mat-pseudo-checkbox-checked {
background-color: #00f;
}
但这没有影响。
最佳答案
我不确定,但是您可以尝试使用
.mat-select-content, .mat-select-panel-done-animating {
background: mat-color($background, card);
}
到
.mat-select-content, .mat-select-panel-done-animating {
background: mat-color($background, card);
.mat-option {
color : mat-color($foreground, text);
}
}
有关详细信息,您还可以检查以下链接
https://github.com/angular/material2/blob/master/src/lib/list/_list-theme.scss
关于angular-material2 - 角 Material -更改单击的垫列表选项的颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49167149/