W3C home > Mailing lists > Public > www-style@w3.org > October 2008

Re: Selector Sugar

From: Simetrical <simetrical@gmail.com>
Date: Fri, 10 Oct 2008 15:14:04 -0400
Message-ID: <7c2a12e20810101214g175086a2k601ba8b4a74a53b0@mail.gmail.com>
To: "Andrew Fedoniouk" <news@terrainformatica.com>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, "Brad Kemper" <brkemper.comcast@gmail.com>, "W3C Style List" <www-style@w3.org>, "Fran├žois REMY" <fremycompany_pub@yahoo.fr>

On Fri, Oct 10, 2008 at 2:57 PM, Andrew Fedoniouk
<news@terrainformatica.com> wrote:
> "there's no possible way to do this" is not correct. Try the following:
>
> . . .
>   div span + span { color:red; }

D'oh.  Shows how often I've used the + combinator (practically never).
 Is there really no case that this would open up, though?  Thinking
about it, you can already AND any simple selectors by concatenation.
ANDing + with + or > with > is similar (where it makes sense).  You
can AND > or " " with ~ or + by concatenation.  You can AND " " with "
" or > by manually enumerating all possibilities, e.g., "x z:match(y
z)" by "x y z, y x z, xy z", or "x > z:match(y z):match(w z)" by "w y
x > z, y w x > z, wy x > z, w yx > z, y wx > z, wxy > z" or something.
 + and ~ are similar.

So I guess it might actually not open up any actual new functionality,
unless I'm missing something.
Received on Friday, 10 October 2008 19:14:39 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:15 GMT