W3C home > Mailing lists > Public > www-style@w3.org > April 2004

Re: content: url() is bad

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 12 Apr 2004 09:51:25 +0000 (UTC)
To: "Sean M. Hall" <pianoman@reno.com>
Cc: www-style@w3.org
Message-ID: <Pine.LNX.4.58.0404120947200.27215@dhalsim.dreamhost.com>

On Mon, 12 Apr 2004, Sean M. Hall wrote:
>
> I have never liked that in CSS you could do something like:
>
> element {
>   content: url(image.gif);
> }

Technically you can't, although we will indeed almost certainly be
allowing something like this in CSS3.


> By doing this CSS is leaving its territory and inserting an image into a
> document--that's HTML's job. Regular content is ok, but inserting images
> is a HTML or Javascript job.

It's actually quite common to want to do this.

For example,

   <h1>XYZ Company</h1>

with:

   h1 { content: url(xyzcompany-logo); }

...is semantically correct.

People have been trying to use "image replacement techniques" for a long
time now, and the way CSS exists right now you have to do ridiculous
things with text-indent and so forth.

-- 
Ian Hickson                                      )\._.,--....,'``.    fL
U+1047E                                         /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 12 April 2004 05:52:06 GMT

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