Unfortunately there is no parent selector in CSS but you can put label
after input
and do something like this (using the adjacent sibling combinator, "+
", in your selector).
HMTL:
<input />
<label><label>
CSS:
input['_type_']:checked + label:after{ /*means the element that follows input*/
some css
}
You can also do some ugly hacky trick and put another label inside your label
JSFiddle
HTML:
<label>
click me
<input type="checkbox" />
<label>color</label>
</label>
CSS:
input[type="checkbox"]:checked + label {
color: red;
}
This way you can click label and do some stuff with another label that goes after the input.
HTH.