Re: [selectors] Previous-sibling combinator?

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