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

Re: Suggestion for CSS3 selectors (fwd)

From: fantasai <fantasai.lists@inkedblade.net>
Date: Tue, 29 Apr 2008 20:10:57 -0700
Message-ID: <4817E341.8040204@inkedblade.net>
To: "Brian J. Fink" <desertowl23@gmail.com>
CC: www-style@w3.org

Brian J. Fink wrote:
> First of all, I meant each of the selectors to be the direct
> child/parent of the one next to it:
> 
> my syntax:
> selector1<selector2<selector3<selector4
> the same as yours?:
> (selector4)>selector3>selector2>selector1

Yes.

> Also, when I said this example:
> 
> b^ol>li span.test:hover
> 
> What I intended was "Pseudoclass 'hover' on element 'span' with class
> 'test', in context of element 'li' which is a child of element 'ol'
> which contains element 'b'."

For that you'd need :matches(). There are several proposals for it, this is
mine:

    :matches($ol b) > li span.test:hover

where $ is ! or parentheses or :subject or whatever we decide the syntax for
"this is the subject of the selector" is.

:matches() is true if an element matches the selector it contains.

~fantasai
Received on Wednesday, 30 April 2008 03:11:34 GMT

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