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

RE: CSS3 and Selectors

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 10 Sep 2002 01:19:16 +0000 (GMT)
To: Adam van den Hoven <list@adamvandenhoven.com>
Cc: W3C CSS List <www-style@w3.org>
Message-ID: <Pine.LNX.4.21.0209100113000.28708-100000@dhalsim.dreamhost.com>

On Mon, 9 Sep 2002, Adam van den Hoven wrote:
> > 
> > If an image is missing, then it will be replaced by the alt 
> > text. If the image is not missing
> No, it creates a box of some size [...]

Oh, right, IE still does that doesn't it.

Sorry, it's been so long since I've used IE that I'd forgotten there are
still browsers our there which get this wrong. Mozilla, Lynx and Links,
the three browsers I use regularly, get this right.

Anyway, if you include the text in the span, you don't need to include the
text in the alt="" attribute, in fact doing so is rather confusing if you
have images disabled, as it will be as if the text was there twice.

> What I meant was that I think something LIKE XPath would make for a very
> nice CSS selector. That is, I want to apply CSS properties to "All the
> input tags that are children of a fieldset whose legend has an input
> element whose type attribute is 'checkbox' and whose checkeded attribute
> is 'checked'" or in other words:
> fieldset[legend/input[@type='checkbox' and @checked='checked']]/input{
> background-color:grey; color:dark-grey;}

Ah yes. My proposal from several years ago would say this in CSS as

   fieldset:has(> legend input[type=checkbox][checked=checked]) > input {
     background-color: grey; color: dark-grey;

We'll see if CSS ever gets something like this.

> The reason I made the comment (which I should not have, it wasn't at all
> useful) was that one could always refer to the text of an element with
> XPath using a/text() so using XPaths for selectors would automatically
> accomplish what I'm talking about. 

I'm not sure that it would be any better than the 'content' mechanism.

Ian Hickson                                      )\._.,--....,'``.    fL
"meow"                                          /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 9 September 2002 21:19:17 UTC

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