W3C home > Mailing lists > Public > www-style@w3.org > August 2017

Re: Select element if next sibling

From: Mark Brown <mark@mercurylang.org>
Date: Thu, 3 Aug 2017 02:01:31 +1000
Message-ID: <CAM4AczCfCwxgO+bL_-d10rK_3ONPMVsYFfNCBcQ4wk+F_2XSDA@mail.gmail.com>
To: Sebastian Malton <sebastian@malton.name>
Cc: Brian Kardell <bkardell@gmail.com>, www-style list <www-style@w3.org>
Hi,

On Thu, Aug 3, 2017 at 1:22 AM, Sebastian Malton <sebastian@malton.name>
wrote:

> I see that :has() is in the current WD but I have also been told that a
> reason for not implemented is to blocks single pass styling. This selector
> would be almost as useful since it fills a role that's refactoring css
> cannot currently fix and it can be done in a single pass. Namely, holding
> onto a pointer to the previous sibling.
>

If you're processing a label you need to check whether the *next* sibling
matches div, so it's the next pointer you need not the previous one.

Mark
Received on Wednesday, 2 August 2017 16:01:54 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 2 August 2017 16:01:55 UTC