I have given focus and active property to input but it doesn't work. After the selection of any color, it doesn't highlight. Hover property is working though.
Below is the code I used to show highlight property for color.
.highlightC:focus,
.highlightC:focus-visible,
.highlightC:visited {
border: 2px solid orange!important;
}
.highlightC:hover,
.highlightC:active {
border: 2px solid white;
}
.highlightC {
height: 20px;
width: 20px;
border-radius: 50%;
display: inline-block;
border: 2px solid transparent;
}
.color1 {
background-color: red;
}
.color2 {
background-color: green;
}
.color3 {
background-color: blue;
}
<div class="text-left mt-2">
<p class="tpColorsHeading ">Available colors</p>
<input type="radio" id="1" name="color" value="1" class="">
<label for="1" class="dot color1 highlightC"></label>
<input type="radio" id="2" name="color" value="2" class="">
<label for="2" class="dot color2 highlightC"></label>
<input type="radio" id="3" name="color" value="3" class="">
<label for="3" class="dot color3 highlightC"></label>
</div>