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

Re: content: url() is bad

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 13 Apr 2004 17:51:28 +0000 (UTC)
To: Mikko Rantalainen <mira@cc.jyu.fi>
Cc: www-style@w3.org
Message-ID: <Pine.LNX.4.58.0404131746300.30867@dhalsim.dreamhost.com>

On Tue, 13 Apr 2004, Mikko Rantalainen wrote:
>>
>> The only practical difference would be that you could no longer change
>> the size of the image, and that a border on the image would no longer
>> go around the image itself.
>
> Yes, that would be the only practical difference. However, I think that
> all specs should target for perfect logic

I think specs should target for better usability. Perfect logic is how you
end up with specs like XForms or RDF, used by very clever people but
obscure to anyone who hasn't read the specs forwards and backwards.


> and logically it would make more sense to place the image in anonymous
> element if that's what happens with text too. I believe that it makes
> things easier with the still unknown CSS properties in the future.

I agree it is easier to specify (and probably implement) that way, but my
question is, is it useful?

One of my requirements is "be able to describe <img> in CSS easily".

How would you do this, using your suggestion?

Using my suggestion, it's:

   img { content: attr(src, uri), attr(alt), none;
         width: attr(width, px); height: attr(height, px); }

...which basically means one reasonably simple extension to 'content', and
the use of 'attr()', which will be introduced in CSS3 Values and Units.


> We'll need a selector to access the anonymous elements in any case,

I'm not convinced it's actually possible to do that. How would it work?


> Therefore I don't see a problem with having to specify some properties
> for the generated content via that selector.

More rules/properties/selectors (especially those involving pseudo-
elements) means more complexity and more cascade problems and typically
more bugs in browsers. Those are the problems. :-)

-- 
Ian Hickson                                      )\._.,--....,'``.    fL
U+1047E                                         /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 13 April 2004 13:51:29 GMT

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