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

RE: CSS3 and Selectors

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 9 Sep 2002 18:53:03 +0000 (GMT)
To: Adam van den Hoven <list@adamvandenhoven.com>
Cc: "'W3C Style'" <www-style@w3.org>
Message-ID: <Pine.LNX.4.21.0209091847460.28708-100000@dhalsim.dreamhost.com>

On Mon, 9 Sep 2002, Adam van den Hoven wrote:
> Ian wrote:
> > On Fri, 6 Sep 2002, Adam van den Hoven wrote:
> > > 
> > > <a href="#"><span class="text">This is a link</span><img 
> > > src="/img/thisisalink.gif" alt="This is a link" /></a>
> > 
> > That is pointless. The whole point of the alt="" attribute is 
> > to include this alternate text. You don't need to explicitly 
> > mention this in the stylesheet, either.
> 
> No its NOT pointless. This code would (and in fact does) appear in
> an application that we host for a large number of clients. Some of
> those clients have to resources to pay for customized graphics.
> Others don't, or don't care. Aside from accessibility issues, my
> overriding concern is with these clients.

I don't understand why this requires you to write code like that above.

If an image is missing, then it will be replaced by the alt text. If
the image is not missing


> > > information that is not strictly meaningful. The <span
> > > class="text"> conveys no additional information.
> > 
> > That is correct.
> 
> I was referring to the tag itself, not its text. 

Me too.


> > In CSS3 you will be able to directly change the content of an 
> > element, using the 'content' property, as in:
> > 
> >    @media screen {
> >       a { content: url(/img/thisisalink); height: 2em; width: 20em; }
> >    }
> 
> Well, that makes me very happy. Perhaps that is a much better solution
> than being able to distinguish the text from the tag. 
> 
> Mind you, I'm a big fan of using XPath-like selectors. 

There was no XPath in there -- the url(...) syntax is from CSS1, and
means "this uri". So in this case, it is saying the image is the file
"/img/thisisalink". This is the same as in your sample code, except
without the pointless extension. (Only Windows users need extensions.
The Web uses Content-Type headers instead, which allows for making
URIs independent of the format of the content.)

-- 
Ian Hickson                                      )\._.,--....,'``.    fL
"meow"                                          /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 9 September 2002 14:53:04 GMT

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