angular - Change radio button color in Material 2 with plain CSS -
i have problems changing color of radio button of angular material 2 component. searched through other answers , couldn't make work.
here plunkr material 2 radio-button example:
https://plnkr.co/edit/jndrkkf2oaxu5gpsr4lo?p=preview
i know work line
<md-radio-button color="primary" class="example-radio-button" *ngfor="let season of seasons" [value]="season"> {{season}} </md-radio-button>
but cannot use "color" property because using older version of material 2 , cannot upgrade currently.
so know how plain css in above example grateful. tried on hour now..
you can using ::ng-deep
. add following classes component style:
/deep/ .mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{ border-color: green; } /deep/ .mat-radio-button.mat-accent .mat-radio-inner-circle{ background-color: green; }
see plunker demo
Comments
Post a Comment