我想更改角度材料中的单选按钮颜色,默认值为'accent',我想将此值设置为#ff9800,我在Angular 6 Material - Hues and How to change the color of mat radio button中找到了此解决方案,但是.mat -radio-外圆圈其值保持在口音,我的问题是如何可以改变它的值(#ff9800)当单选按钮是checked.Here是我的CSS和HTML代码。
/* border-color:rgb(66, 134, 244); */
::ng-deep.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle {
color:#ff9800;
border-color: #ff9800;
}
::ng-deep.mat-radio-button.mat-accent .mat-radio-inner-circle{
color:#ff9800;
background-color:#ff9800;
}
::ng-deep.mat-radio-button.mat-accent .mat-radio-ripple .mat-ripple-element {
background-color:#ff9800;
}
<mat-radio-group aria-label="Select an option" class="actions" [(ngModel)]="action"
[ngModelOptions]="{standalone: true}">
<mat-radio-button value="Compile" checked ="true" color="accent">Compile</mat-radio-button>
<mat-radio-button value="Check Syntax" color="accent">Check Syntax</mat-radio-button>
</mat-radio-group>