W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2014

Re: [whatwg] relationship between labeled control and label for :active and :hover pseudos

From: Florian Rivoal <florian@rivoal.net>
Date: Sat, 15 Nov 2014 11:14:29 +0100
Message-Id: <1283315F-F59F-418B-A06D-F1A64A3EC3C3@rivoal.net>
To: Ryosuke Niwa <rniwa@apple.com>
Cc: whatwg@lists.whatwg.org, Boris Zbarsky <bzbarsky@mit.edu>

> On 14 Nov 2014, at 21:34, Ryosuke Niwa <rniwa@apple.com> wrote:
> On Nov 10, 2014, at 2:48 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
>> On 11/10/14, 5:31 PM, Florian Rivoal wrote:
>>> That said, the labeled control also maintains a list of references to the associated labels, so there is no particular difficulty involved in finding them.
>> The difficulty is not finding them.  The difficulty is efficiently updating hover state on the set of ancestors of all the nodes involved, some of which might still be in hover state when the control ceases to be.
> Indeed.  It appears to me that this use case can be solved by the proposed :has() relational pseudo class as long as the author has structured so that the label is an ancestor of the input control itís associated with: http://dev.w3.org/csswg/selectors4/#relational

Thereís two problems with that:

* You constrain the markup beyond what html normally allows to be able to achieve some specific styling effects

* the :has() pseudo class is not part of the so called fast profile, which means that by spec, CSS implementations must not support it (the DOM query() method should).

 - Florian
Received on Saturday, 15 November 2014 10:14:57 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:26 UTC