W3C home > Mailing lists > Public > www-style@w3.org > May 2010

Re: [css3-content] "content" property, replaced elements, and width

From: Anne van Kesteren <annevk@opera.com>
Date: Sat, 08 May 2010 19:52:05 +1000
To: "Robert O'Callahan" <robert@ocallahan.org>, "L. David Baron" <dbaron@dbaron.org>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, "www-style list" <www-style@w3.org>
Message-ID: <op.vceekkp064w2qv@annevk-t60>
On Sun, 09 May 2010 01:05:07 +1000, L. David Baron <dbaron@dbaron.org>  
> That is, with this
> extension, an image element is just displayed using the rule:
>   img { content: attr(src, url); }

I used to think this was a pretty neat abstraction, but now I know more of  
how <img> interacts with the DOM in terms of events and state exposed on  
the HTMLImageElement object I wonder whether it is still useful to think  
of <img> being implemented in the above way. I.e. if the HTML just says


and the CSS says

   img { content:url(whee) }

I would not expect a load or error event to be dispatched, the  
naturalWidth IDL attribute would return 0, etc.

Having said not creating anonymous boxes if not necessary would be  
somewhat nicer, though note that



   content:url(whee) "test"

will give widely different results as a consequence. (Not a huge problem  
in my opinion.)

Anne van Kesteren
Received on Saturday, 8 May 2010 17:53:04 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:34 UTC