Re: content: url() is bad

On 14 Apr 2004 at 14:00, Ian Hickson wrote:

> On Wed, 14 Apr 2004 staffan.mahlen@comhem.se wrote:
> >>
> >>    http://ln.hixie.ch/?start=1075242104&count=1
> >>    http://ln.hixie.ch/?start=1081717954&count=1
> >
> > In both those cases using the object element seems more appropriate?
> 
> Why? The two are basically equivalent.

How do you make:
<img src="..">
	<table>...
</img>
work? Thats a rather fundamental difference to me. I saw your alt-
descriptions as elaborate enough to warrant the object, while i see 
img as more for the trivial stuff. Your entities might for instance 
have worked better as markup?

> I'm not convinced... could you give an example that is hard to debug?
> 
> If you have:
> 
>    ...
>    h2#news { content: url(news.png); }
>    ...
>    h2#navigation { content: url(N) "avigation"; }
>    ...
>    h2 { border: solid; }
> 
> ...then admittedly the borders on:
> 
>    <h2 id="news">News</h2>
>    <h2 id="navigation">Navigation</h2>
> 
> ...will look different, but isn't it going to be reasonably obvious that
> the problem is that one just has an image and one has more than an image?

No i am afraid that this is non-obvious IMHO. Its a very rare case 
indeed, so not a major issue, but each such addition adds to the 
complexity of CSS.

> I guess what I'm saying is that I think the usability benefits (it Just
> Works when you want to resize an image) outweigh the problems (that it
> will be inconsistent when you use an image vs an image and some text).

You are probably right.

> > IMVHO this is where CSS oversteps its boundries, and mixes layers.
> 
> You mean as apposed to:
> 
>    head { display: block; }
>    style, script { display: table-cell; }
>    body { display: none; }
> 
> ...?

That's a nice point :), but those are not "messing" with the document 
tree or style/semantics distinction, they just create one possible 
view of the data. Other options might be 'white-space: pre' or that 
content special-cases the Unicode code point "\A". 

> It's not a document fragment, it's just a list of CSS boxes, like in CSS2.
> There is no nesting allowed, no formatting allowed. It's just a list of
> text strings mixed in with replaced elements.
> 

Was "replaced elements" a typo? Thats probably where i would like to 
refer to the markup language since that suggests semantics to me. I 
am not quite as sure where to draw the line as the person who started 
this thread however. 

 /Staffan

Received on Wednesday, 14 April 2004 11:15:35 UTC