Chrome version 102.
How to add an accent-color to indeterminate checkbox state?
<input type="checkbox" class="my-checkbox"/>
.my-checkbox {
accent-color: blue
}
//checkbox is blue when checked
const checkbox = document.getElementById("my-checkbox");
checkbox.indeterminate = true;
//checkbox color turns grey
Aucun commentaire:
Enregistrer un commentaire