Re: content: url() is bad

On Mon, 12 Apr 2004, Boris Zbarsky wrote:
>
> Compare:
>
> h1 { content: url(xyzcompany-logo); }
> h1 { content: "Logo: " url(xyzcompany-logo); }
> h1 { content: "\160  " url(xyzcompany-logo); }
> h1 { content: "\feff  " url(xyzcompany-logo); }
> h1 { content: url(something) url(xyzcompany-logo); }
>
> How would these all render if the company logo fails to load?

The key is to consider how these would render if the company logo _did_
load.

The current idea (not in any published spec) is that the first one would
cause h1 to become a replaced element, and the other four would cause the
contents of the h1 to be removed and have a string followed by a replaced
element (or, in the last case, two replaced elements) used instead.

So when the first fails, it gets replaced by its contents, but for the
the three there is no fallback so it just uses what it says.

Maybe there could be the option of using a fallback in any case that there
is an image in.

Do you have a better proposal? I haven't fully thought this through yet.

-- 
Ian Hickson                                      )\._.,--....,'``.    fL
U+1047E                                         /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'

Received on Monday, 12 April 2004 12:32:57 UTC