W3C home > Mailing lists > Public > www-style@w3.org > February 2015

Re: [selectors] Previous-sibling combinator?

From: Benjamin Poulain <benjamin@webkit.org>
Date: Sun, 08 Feb 2015 18:27:50 -0800
Message-ID: <54D81B26.3050907@webkit.org>
To: www-style@w3.org
On 08/02/2015 13:16, Tab Atkins Jr. wrote:
> On Mon, Feb 9, 2015 at 2:31 AM, Clive Chan <doobahead@gmail.com> wrote:
>> I feel like ~ should have been used for previous-sibling, since it's
>> sometimes used as a negation operator. And then just use ++ or ~~ to
>> indicate the "all after/before" combinators. The ship has long sailed for
>> that, though, unless we're planning on breaking backwards compat.
>>
>> I like the idea of requiring spaces around the dash - it'll actually force
>> people to write nicely spaced out CSS combinators, haha - but it does break
>> typical naming conventions. Hm. I'm still for it, though.
>>
>> Or we could use more wordy things such as :siblings, :siblings:before,
>> :siblings:after, similarly to the jQuery .siblings() function (do any
>> frameworks have CSS-ified syntax for all-siblings yet?).
> Agreed that it should have been spelled ++ originally. ^_^  At least
> we can make up for the mistake with the descendant combinator - it can
> now be spelled >> as well as with a space (at least, per spec - no
> browser has picked it up yet).
Actually WebKit supports ">>" for descendant if you want to try.
> The way we do named combinators now is as /foo/ - a name between two
> slashes.  So /siblings/ or /prev-sibling/, etc, is possible.
>
> ~TJ
>
Received on Monday, 9 February 2015 02:30:03 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:52:01 UTC