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

Re: [cssom] Serializing the ">>" combinator

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Sat, 14 Feb 2015 10:49:25 +1100
Message-ID: <CAAWBYDBSM-q5ua=+tKSf+9-PsvxMDnUC0O4xXeJuCcFAXBTTGA@mail.gmail.com>
To: Simon Pieters <simonp@opera.com>
Cc: www-style list <www-style@w3.org>, Benjamin Poulain <benjamin@webkit.org>
On Feb 12, 2015 10:25 PM, "Simon Pieters" <simonp@opera.com> wrote:
>
> On Fri, 13 Feb 2015 00:05:45 +0400, Benjamin Poulain <benjamin@webkit.org>
wrote:
>
>> On 2/12/15 1:22 AM, Simon Pieters wrote:
>>>
>>> On Tue, 10 Feb 2015 09:14:26 +0400, Benjamin Poulain <
benjamin@webkit.org> wrote:
>>>
>>>> Hi,
>>>>
>>>> The serialization specification does not mention ">>" from CSS
Selectors level 4: http://dev.w3.org/csswg/cssom/#serializing-selectors &&
http://dev.w3.org/csswg/selectors-4/#descendant-combinators
>>>>
>>>> What we have done in WebKit is serialize ">>" like the other non-space
combinators (e.g. "foo>>bar" serialize to "foo >> bar").
>>>>
>>>> An other option is to canonicalize every descendant combinator to the
space character.
>>>
>>>
>>> I've specified it to serialize as a space, for two reasons:
>>
>> I am a bit surprised by this. I had the impression the WG favored ">>"
over the space.
>
>
> Personally I see no reason to favor >>. The only reason I have seen for
it existing at all is that it makes for a "nice" family of combinators >,
>> and >>>. But it is possible that I'm missing something.

It's also required for some corner-cases with relative selectors.

>>> * It avoids having to remember which one was used when parsing
>
> This is the stronger reason in my opinion. Also see
https://lists.w3.org/Archives/Public/www-style/2015Jan/0603.html

Agreed.

~TJ
Received on Friday, 13 February 2015 23:49:53 UTC

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