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

Re: [selectors4][css-syntax] Pseudo-elements vs. combinators

From: François REMY <francois.remy.dev@outlook.com>
Date: Thu, 6 Feb 2014 00:52:24 +0100
Message-ID: <DUB130-DS19C026C79B24DC84EACB9EA5950@phx.gbl>
To: "Tab Atkins Jr." <jackalmage@gmail.com>, "Matthew Robb" <matthewwrobb@gmail.com>
Cc: "Brian Kardell" <bkardell@gmail.com>, "www-style list" <www-style@w3.org>, "Sylvain Galineau" <galineau@adobe.com>, "Simon Sapin" <simon.sapin@exyr.org>
My current thought on this would be "->" or "=>", because the combinator is 
a concept similar to mapping an element to a set of elements (if you read 
from left to right, like web authors do):

    #some-element -> shadow-tree -> .some-elements { ... }
    #some-element -> shadow-full-tree -> .some-elements { ... }

if we want to retroactively express current combinators:

    #some-element -> descendants -> .some-elements { ... } // ( )
    #some-element -> children -> .some-elements { ... } // (>)
    #some-element -> next-sibling -> .some-elements { ... } // (+)
    #some-element -> next-siblings -> .some-elements { ... } // (~)

Best regards,
François



________________________________________________________
[off-topic-post-scriptum]

because some of us like being crazy, we could even allow the reverse 
combinator syntax like in

    .some-elements {
        color: blue;
        & <- next-sibling <- .some-other-elements {
            color: red;
        }
        & -> next-sibling -> .some-different-elements {
            color: green;
        }
    }

aka

    .some-elements { color: blue }
    .some-other-elements + .some-elements { color: red }
    .some-elements + .some-different-elements { color: green } 
Received on Wednesday, 5 February 2014 23:52:36 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:18 UTC