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

Re: content: url() is bad

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 15 Apr 2004 01:49:35 +0000 (UTC)
To: Boris Zbarsky <bzbarsky@MIT.EDU>
Cc: www-style@w3.org
Message-ID: <Pine.LNX.4.58.0404150139380.22246@dhalsim.dreamhost.com>

On Wed, 14 Apr 2004, Boris Zbarsky wrote:
> Ian Hickson wrote:
>>  D. Do something that hasn't yet been suggested.
> Something that was suggested was "content" to generate kids (acts as B),
> and "replacement" to make a replaced element.
> If replacement is set, content computes to something appropriate (there
> is precedent with the way float affects display, eg).
> I _think_ that's more intuitive for authors.  But maybe I'm wrong and
> the interaction of the two properties will confuse them....

The interaction of 'float' and 'display' (and 'position') is one of the
issues authors bring up all the time as examples of CSS being way too

But it could work... Basically, have:

   img {
     replace: attr(src, uri);
     width: attr(width, px); height: attr(height, px);
     content: url(image-icon) attr(alt);

   object {
     replace: attr(data, uri);

   abbr[title] {
     content: attr(title);

(...which is actually exactly what is in the current draft, except that in
the current draft the 'replace' values come at the start of 'content' and
there is no fallback for when 'content' is not replaced.)

I suppose I could live with that. It doesn't cascade too well, I guess...
How about actually putting it all on one property, like this:

   Values: [ <uri> [ ',' <uri> ]+ '/' ]? [ <content-list> [ ',' <content-list> ]+ | normal

So the above would become:

   img { content: attr(src, uri) / url(image-icon) attr(alt); ... }
   object { content: attr(data, uri) / contents; }
   abbr[title] { content: attr(title); }

Ian Hickson                                      )\._.,--....,'``.    fL
U+1047E                                         /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 14 April 2004 21:49:37 UTC

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