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

On Tue, 02 Dec 2014 14:08:58 +0100, Florian Rivoal <florian@rivoal.net>  
wrote:

>> On 02 Dec 2014, at 01:22, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>>
>> On Thu, Nov 27, 2014 at 1:53 AM, Simon Pieters <simonp@opera.com> wrote:
>>> 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)
>>
>> Yeah, either one works I suppose.
>
> This works, and is more generic if you can have arbitrary selectors in  
> the :for(), which is nice.
>
> On the other hand, the current approach taken by selectors for these  
> things (see :hover, :active, :has-focus) is too define a hook and leave  
> it up the the host language to define what that matches.
>
> Does SVG take advantage of this? Do we expect it to?
> Do we expect HTML to do something else than label<->labeled-control  
> matching with this?
> Any other relevant host language to care about?

I think currently it's just HTML label->control for :hover. I'm not aware  
of any plans other than fixing :active (and :has-focus I guess).

> Wondering how much extensibility we’d actually lose if we didn’t go  
> through the host language hook.

We can define :for() as a host language hook.

-- 
Simon Pieters
Opera Software

Received on Tuesday, 2 December 2014 13:32:44 UTC