I was just wondering anyone had any info on something that I may well have just made up in my own head...
Whilst working away tonight I was looking at styling up a filtering system for a product category listing, and whilst looking at the following code found a bit of an issue that someone might be able to suggest a solution to.
<label>
<input type='checkbox' id='test_id' name='test_name' value='test_value'/>
Test
</label>
Once I began working on the style I thought wouldn't it be great to be able to style that label based on the pseudo-selector
#test_check_id:checked PARENT_ELEMENT
where PARENT_ELEMENT would be the next ascendant element of the input in question.
In this way I could drop in style to give better feedback as to what the user has decided on for filtering constraints.
I realise I "could" do this with javascript and css, and in fact that kinda seems like the only way to provide this in my head right now after a little searching for an answer, but I just wondered if anyone can shed any more light on the subject for me. Feel free to LMGTFY if I've missed something glaringly obvious.
Cheers!