Re: [css3] Proposal: Additional adjacent combinator (E - F)

Ian Hickson wrote:
>
> Your suggestion breaks a fundamental tennet of Selectors up to now, namely
> that the last element mentioned in the selector chain is the one that
> matches the selector.
> 
> Personally to solve this I prefer my :matches() proposal. See:
> 
>    http://lists.w3.org/Archives/Public/www-style/2003Apr/0146.html
> 
> ...and related threads.

Correct me if I'm wrong, but I believe that "tenet" was designed not as
a restriction but as an explanation. The current set of selectors doesn't
/allow/ selecting anything but the last in a chain of preceding elements.
If it's last in the tree, then of course it must be last in the selector
chain.

Now, I don't agree with the idea of having some combinators go up the tree
and others go down--that can get extremely complicated and confusing--but
I believe breaking this tenet to allow an explicit subject indicator would
make the selector easier to understand than :matches() would. And IMO,
making the selector easier to understand is more important than making it
fit a rule designed to explain the current situation.

~fantasai

P.S. FYI (and so Ian won't have to correct me for the list's benefit ;)
      I'm noting that :matches() allows more complex selectors than simply
      changing the subject would. I'm /also/ noting that :matches() and a
      subject selector aren't mutually exclusive, and that I think the two
      make a rather elegant combination.
        http://lists.w3.org/Archives/Public/www-style/2000Oct/0185.html
      I think, however, that I will not spare Ian the trouble of saying that
      he disagrees.

Received on Wednesday, 28 January 2004 02:14:17 UTC