Re: content: url() is bad

On Mon, 12 Apr 2004, Ian Hickson wrote:

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

People want to do all kinds of things, mostly things that are not
possible, or not wise. (But we usually learn to filter things out so that
we don't express a wish if we realize it's impossible.) So it's not a very
strong argument, as such.

> For example,
>    <h1>XYZ Company</h1>
> with:
>    h1 { content: url(xyzcompany-logo); }
> semantically correct.

What's wrong with
<h1><img alt="XYZ Company" title=
"XYZ Company logo, designed by S. Alva d'Ordali"
apart from the obvious (i.e., that we should really use
<object>, if only it were reasonably defined and decently implemented)?

After all, a logo (as a specific appearance, specified by image data) is
content rather than stylistic variation.

Admittedly, if you move to things like headings appearing in a specific
font, it might be reasonable to treat the difference between an image and
a text as stylistic only. But in that case, wouldn't we need good tools
for setting font (e.g., via font embedding) rather than a kludge that
replaces text data by image data?

> 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.

Maybe, but the content: url(...) thing is really a brute force method, and
it evitably opens a wide range of possibilities of creating confusion.
As a general tool, it crosses the line between styling content and
changing content.

Jukka "Yucca" Korpela,

Received on Monday, 12 April 2004 08:06:37 UTC