.checkbox__container {
display: flex;
flex-direction: row;
align-items: center;
padding: 0px;
gap: 8px;
& input[type="checkbox"] {
box-sizing: border-box;
width: 20px;
height: 20px;
accent-color: red;
background-color: red;
border: 1px solid #575352;
border-radius: 1px;
flex: none;
order: 0;
flex-grow: 0;
&:hover {
background-color: red;
accent-color: red;
border: 1px solid #575352;
border-radius: 1px;
flex: none;
order: 0;
flex-grow: 0;
}
&:checked {
accent-color: #0A8276;
border-radius: 1px;
flex: none;
order: 0;
flex-grow: 0;
&:hover {
accent-color: #08665C;
border-radius: 1px;
flex: none;
order: 0;
flex-grow: 0;
}
}
}
}
By default and on hover, the background color does not change, but if you click it, and you check it, then the checked background-color is the correct one, and on hover over the checked state, the background color also changes correctly as specified in the scss file.
Why does it not work for the default non-checked state?