Re: Suggestion for CSS3 selectors (fwd)

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 UTC