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

Re: Select element if next sibling

From: Florian Rivoal <florian@rivoal.net>
Date: Sat, 29 Jul 2017 16:04:42 +0200
Cc: Sebastian Malton <sebastian@malton.name>, "www-style@w3.org" <www-style@w3.org>
Message-Id: <D1DECEB0-0A8F-4570-9B7D-8F7BAD9594FB@rivoal.net>
To: Sebastian Zartner <sebastianzartner@gmail.com>

> On Jul 28, 2017, at 22:43, Sebastian Zartner <sebastianzartner@gmail.com> wrote:
> 
> On 27 July 2017 at 06:23, Sebastian Malton <sebastian@malton.name> wrote:
>> Something like `label+div` selects all divs directly following a label. I
>> propose `label ->div` which selects all labels that are followed by a div
>> 
>> Sebastian
> 
> That's already covered by the :has() pseudo-class defined in
> https://drafts.csswg.org/selectors/#relational.

Right, except that :has() is excluded from the dynamic profile (i.e. selectors you can use in regular CSS). Regardless of syntax, this previous sibling selector should be possible to implement in the dynamic profile.

—Florian
Received on Saturday, 29 July 2017 14:05:05 UTC

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