W3C home > Mailing lists > Public > www-style@w3.org > September 2006

Re: [css3-selectors] :parent selector

From: Alastair Campbell <ac@alastc.com>
Date: Wed, 27 Sep 2006 19:15:55 +0100
Message-ID: <451ABFDB.8010002@alastc.com>
To: fantasai <fantasai.lists@inkedblade.net>
CC: www-style@w3.org

fantasai wrote:
> My favorite:
>   :link {
>      background: navy;
>      color: white
>      border: outset thin white;
>   }
>   /* select links with img child, i.e. all image links */ {
>      background: transparent;
>      border: none;
>   }

Sorry I'm late, but would this have the same effect?

a:text-node {
   background: navy;
   color: white
   border: outset thin white;

"text-node" could be completely the wrong thing to call it, but is 
intended to mean links which have only text within them, no tags (such 
as img).

That may not encompass all the situations you might want, I was looking 
for a variation on ":empty" here:
(But no reply).

I would have though that looks down the tree, not up?

Computationally (he guesses!) it would be check the link, and check if 
it has another element within it, and bails on the first one, or applies 
the style.

Given that an <a> is inline, you don't have the problem of infinite 

Kind regards,

Received on Wednesday, 27 September 2006 18:16:05 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:26 UTC