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

More CSS Selector suggestions

From: Jonas Sicking <sicking@bigfoot.com>
Date: Fri, 5 May 2000 20:18:40 +0200
Message-ID: <009601bfb6be$5742cba0$3110f7d4@Milwork08>
To: <www-style@w3.org>
Hi!

I have some more suggestions for the CSS3 Selectors WD:

1. Styling XML enteties
This seems rather essential for beeing able to style an arbitary XML
document. This could be used for

&null; {content: 'N/A'}
&err; {content: 'Error'; color: red; font-weight: bold;}

2. loading pseudo-classes

A :loading pseudoclass could be used to replace content while it is beeing
loaded. This would apply for elements that has xlink:show="embed". There
could also be a class called :load-failed that applys to element that was
supposed to be replaced by loaded content but the load failed.

An example:
<style>
img:loading {
content:  url("stdimg.png") "loading..."
}

img:loadingfailed {
content:  url("loaderr.png") attrib(alt)
}
</style>
<img xlink:href="img.png" xlink:show="embed" alt="An image"/>

Senario 1 (img.png exists):
While the image is beeing loaded the text "loading..." is shown along with a
small image (about how it works in browsers today). Once the loading is done
img.png will be show instead.

Senario 2 (img.png dosn't exist):
While the UA tries to load the image the text "loading..." is shown along
with a small image (as above). Once the UA concludes that it's not able to
load the img.png another image is shown (loaderr.png) along with the alt
text (as current browsers do)

/ Jonas Sicking
Received on Friday, 5 May 2000 14:18:10 GMT

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