I have the following markup:
<label>
<input type="checkbox">
One
</label>
<label>
<input type="checkbox">
Two
</label>
I would like to change the label background for the checkbox checked state.
The issue is that the input is inside the label, so I can't use the good old input[type=checkbox] + label {}
I cannot change this markup, so I cannot easily just add <span>
tag around the text.
Is there a way to change the label on :checked
state?
Here is my work in progress fiddle: https://jsfiddle.net/kgpnbdzy/2/