Re: [selectors] applying pseudo classes to the label based on the labeled control

On Thu, 27 Nov 2014 01:00:49 +0100, Florian Rivoal <florian@rivoal.net>  
wrote:

>
>> On 27 Nov 2014, at 00:52, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>>
>> On Wed, Nov 26, 2014 at 2:26 PM, Florian Rivoal <florian@rivoal.net>  
>> wrote:
>>>> On 20 Nov 2014, at 18:17, Florian Rivoal <florian@rivoal.net> wrote:
>>>> Having this apply to the input pseudo classes[2] might make sense as  
>>>> well.
>>>
>>> However, I forgot to bring this part up. What does everyone think?
>>
>> They don't currently apply in either direction, do they?
>
> No, they don’t. The label->control direction is nonsensical, but the  
> control->label is the one I am suggesting could be useful.
>
> You could then style the label of a disabled input, of an invalid input,  
> a required input, etc.

I'm not sure web developers would expect a selector like *:invalid to  
match labels. Maybe instead we should have a dedicated mechanism to target  
a control's labels?

e.g.

label:for(*:invalid)

-- 
Simon Pieters
Opera Software

Received on Thursday, 27 November 2014 09:53:26 UTC