W3C home > Mailing lists > Public > www-style@w3.org > May 2002

RE: small selector syntax addition

From: James Craig <james@cookiecrook.com>
Date: Fri, 3 May 2002 00:20:10 -0500
To: <www-style@w3.org>
Message-ID: <JFEGIJBOOAMICAMNFLBEMELBCBAA.james@cookiecrook.com>

I second this proposal. I've had numerous occasions where I'd like to affect
the parent element of an anchor in a hover state. I've had to use a script
before, but this would work much better.

(p.nav) a:hover {
  background-color:#fff;
  }

Does anyone have objections to the use of parenthesis and if so, what is a
better suggestion? I personally think the syntax is very logical. I would be
interested to hear more on this discussion.

James Craig


-----Original Message-----
From: Daniel Brooks
Subject: small selector syntax addition

I'd like to propose an addition to the selector syntax that I feel
would be very useful. I have a feeling that the same effect could be
accomplished with the all-powerful :matches selector, but I'm not sure.

What I'd like to be able to do is match an element not at the end of
the chain, but without a lot of mess. Using parenthesis seems like the
easiest way to go about it:

#menu (li) > a[href] { /* match an li inside the #menu that has an
anchor with an href as a child */ }

Leaving out the parenthesis would naturally be the same as putting them
around the last element in the chain.

db48x
Received on Friday, 3 May 2002 01:17:10 GMT

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