W3C home > Mailing lists > Public > www-style@w3.org > December 2014

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

From: Florian Rivoal <florian@rivoal.net>
Date: Thu, 4 Dec 2014 00:27:25 +0100
Message-Id: <80C2A974-84F2-4CF6-BB5F-6E56FA339500@rivoal.net>
To: www-style list <www-style@w3.org>

> On 26 Nov 2014, at 23:26, 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?

Today during the conf call I was asked for evidence that this is actually something authors want. Here's some:

Stack overflow question wanting label:for(:disabled) :

Stack overflow question wanting label:for(:checked) :

Code found on github which puts the label after the input to use the + selector, but could use more semantic markup with the for attribute and use label:for(:valid) label:for(:invalid) and label:for(:required) instead if they existed:

An example on Tab's side (click on the ingredients) which would work without artificially convoluted markup if it could do label:for(:checked)

- Florian
Received on Wednesday, 3 December 2014 23:27:50 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:49 UTC