lundi 31 mai 2021

How to change the color on checkmark on disabled checkbox

Here is example of my CSS:

.checkbox { 

input[type='checkbox'] {
&+label{
&:after {
content: '';
border: 2px solid white
}}

&:disabled{
&+label{
&+:before{
opacity: .7;
}}
}}
}

So the border: 2px solid white; is changing the color of the checkmark. But in both situations, when checkbox is disabled and enabled.

I need to change the color of the ckeckmark in black only if its disabled.

If i try to change here &:disabled{...} It is changing the color only on the border and not on the checkmark.

Does someone know how to change the color on checkmark in disabled checkbox?




Aucun commentaire:

Enregistrer un commentaire