I have two custom styled radio buttons, and am trying to highlight a border of the one that is focused, but since I have styled them with :before and :after I can't seem to get the :focus target right.
Here's a jsFiddle https://jsfiddle.net/o5htfhdm/2/ The desired effect is that when a radio button is clicked(focused) its border is blue, but as soon as the user clicks somewhere else, for example in to the text input below the border will go back to black
The change the color of the radio button border we need only
input[type="radio"]:after{
border-color: #000;
}
So now what I am trying to do is
input[type="radio"]:focus > input[type="radio"]:after{
border-color: blue;
}
But that doesn't work