- From: Florian Rivoal <florian@rivoal.net>
- Date: Sat, 15 Nov 2014 11:14:29 +0100
- 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