W3C home > Mailing lists > Public > www-style@w3.org > August 2007

[CSS3 proposal] 'replace-by-image' property

From: Nikodem <nikn1@gazeta.pl>
Date: Wed, 01 Aug 2007 12:42:03 +0200
Message-ID: <46B0637B.2030301@gazeta.pl>
To: www-style@w3.org

I think that [X]HTML image tag <img src="..." /> is OK for 
content-related images (photos for articles etc.), but not for 
navigation (<ul><li><a href="mailto:a@b.c"><img src="mail.png" 
alt="Mail" /></a></li></ul>), where it is going to be a little 
presentational. It could be made so:

	<style type="text/css">
	ul li#mail{replace-by-image:url("mail.png");}
	@media print{ul li#mail{replace-by-image:none;}}

	<ul><li id="mail"><a href="mailto:a@b.c">Mail</a></li></ul>

If the image could not be loaded (or document would be printed), then
only text would be displayed, otherwise there would appear mail.png image.

That gives a possibility of editing look of page only from CSS, not 
[X]HTML. Earlier I had many problems with making printable versions of 
page (e.g. overriding logo by black'n'white version was requiring 
separated printable version in another HTML document).

JID: nikn@jabber.org

Opole - Miasto Bez Granic.
http://www.opole.pl - tu znajdziesz nowe miejsca, nowe mo¿liwo¶ci, nowe inspiracje...
Received on Wednesday, 1 August 2007 10:40:11 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:30 UTC