Re: Stand-in color before images load

Joshua RANDALL FTRD/DIH/BOS wrote:
> 
> Having a general purpose pseudo class to represent the loading status of 
> elements that reference externally sourced data sounds like a useful idea.
> 
> Perhaps it would be useful to have something like ":loading", ":loaded", 
> and ":loadfail"?

I don't see :loaded or :loadfail as useful, but the concept of :loading 
is slightly different and could actually be useful.

The object element has a standby attribute [1] (although it's a 
<standby> element in XHTML2 [2]) which is designed to be shown by user 
agents while the content is loading.  Perhaps a :loading or :standby 
pseudo-class could be used to select elements in this state.

eg. For (X)HTML 4.01/1.x:
   object[standby]:standby { content: attr(standby); }

Would select any object with a standby attribute that is in the :standby 
state.

For XHTML2:
   object:standby *:not(standby) { display: none; }

would remove all content from the display except the standby element 
from an object in the :standby state.


[1] http://www.w3.org/TR/html401/struct/objects.html#adef-standby
[2] http://www.w3.org/TR/2004/WD-xhtml2-20040722/mod-object.html#sec_21.3.

-- 
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/     Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox

Received on Wednesday, 30 March 2005 14:38:35 UTC