W3C home > Mailing lists > Public > www-style@w3.org > March 2012

Re: [selectors4] Should the reference combinator really be a combinator?

From: Brian Kardell <bkardell@gmail.com>
Date: Wed, 7 Mar 2012 12:13:50 -0500
Message-ID: <CADC=+jcyXtqVRqk7x4fcRfNjTCREtmMiuAZNF3H+oUwgc4q1VA@mail.gmail.com>
To: Christopher Jeffrey <chjjeffrey@gmail.com>
Cc: www-style@w3.org
Probably helpful to include links to the original discussions which
considered various things...



On 3/6/12, Christopher Jeffrey <chjjeffrey@gmail.com> wrote:
> Hi,
> I maintain a selector engine written in javascript[1]. I initially
> didn't realize how awkward the reference combinator[2] was until I
> tried to implement it.
> The problem was apparent after I wrote the first implementation: every
> combinator represents some kind of positional relationship between two
> elements. The reference combinator, on the other hand, does not. An
> element that references another could be located anywhere in the tree.
> This requires a kind of hacky workaround to implement; a special case,
> just for the reference combinator. It's awkward to implement and
> awkward to understand. It doesn't really fit the description of a
> combinator. The syntax is strange, as well as inconsistent with the
> combinators we've known for years, and I'm sure it's confusing even to
> long time css users who are seeing it for the first time.
> On top of all this, there's the question of how practical and useful
> it would be in reality. Would the average css user ever touch this
> combinator, aside from the occasional label/input use-case?
> I just want to spark some discussion about this.
> [1]: https://github.com/chjj/zest
> [2]: http://www.w3.org/TR/selectors4/#idref-combinators
> --
> Christopher Jeffrey <chjjeffrey@gmail.com>
> http://github.com/chjj
Received on Wednesday, 7 March 2012 17:14:24 UTC

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