RE: CSS3 and Selectors

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
follows:

   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