Re: [selectors] Previous-sibling combinator?

04.02.2015, 07:21, "Tab Atkins Jr." <jackalmage@gmail.com>:
> Dash has significant parsing complications - dashes tend to get
> absorbed into nearby identifiers.

/* I was sure that this is a reply to my question in my thread asked 5 days ago [1]. */

As for exact form of combinator -- be it a dash or another combinator, it is actually a very minor thing -- the idea is the same anyway.

I believe that making whitespace around dash as a combinator required would be enough while not confusing at all (I literally don't understand why some people don't put whitespace around ALL atomic selectors ALWAYS -- how can they read that mess?).

BUT if dash is any problematic, we could easily use a combination of two characters or a pseudoclass or just a literal colon. For example, instead of originally proposed by me 3 years ago [2]:

    P - UL {
        /* Styles for UL element which is
           previous sibling of P element. */
    }

we could use this:

    P <- UL {}

or this:

    P :prev UL {}

or just this:

    P : UL {}

So we need just to choose a best of these options and go on.

So what are our next steps to actually add the previous-sibling combinator to the selectors spec and ensure that your conclusion [3] will not be lost and forgotten?

Thanks.

[1] https://lists.w3.org/Archives/Public/www-style/2015Jan/0610.html
[2] https://lists.w3.org/Archives/Public/www-style/2012Jan/1245.html
[3] https://lists.w3.org/Archives/Public/www-style/2015Jan/0583.html

Received on Wednesday, 4 February 2015 13:26:05 UTC