I am trying to style the checked radio buttons and checkboxes with CSS.
.radiocheck:checked~.square {
background: green;
}
<label class="square">
<input type="radio" class="radiocheck" name="test"/>
<span>Radio number one</span>
</label>
</br>
<label class="square">
<input type="radio" lass="radiocheck" name="test"/>
<span>Radio number two</span>
</label>
If the radio is checked, I want the background around the radio and the label to be green.