- From: Laurens Holst <lholst@students.cs.uu.nl>
- Date: Mon, 08 May 2006 11:07:13 +0200
- To: emrahbaskaya@hesido.com
- Cc: www-style@w3.org
- Message-ID: <445F0A41.1010804@students.cs.uu.nl>
Emrah BASKAYA schreef: > Bert Bos wrote: > --cut- > >> Fonts and image replacement - >> - What if I want to use the image *only* if my special font cannot >> be downloaded/is not installed on the user's system? >> > --cut- > > I have quite many times started discussions about replacement > background-colours esp. good for alpha images, and I was planning to give > it another go with a much broader approach enabling the logic to be used > for other properties (and also is inspired by earlier proposals by > others), here it be : > > Generic fallback mechanism > (Please discuss the idea and not the syntax itself, I am sure W3 would > find good ways to realise it.) > background: [transparent url(grayishsemitransparent.png) repeat] > [gray url(grayishopaque.jpg) 50% 50% no-repeat] > [gray]; > Hey Emrah, I think it sounds sensible, although there are of course a million ways for the syntax. E.g. one case that you didn’t think of and that the syntax you propose doesn’t take care of is that these things usually span multiple properties; in the case of background-image there is a convenient ‘background’ shorthand which allows you to modify several separate properties at once (or ‘font’ for font-family), but this isn’t always the case of course, and this also might not always be convenient. Just one example of this, when changing the background to a fallback colour when the image doesn’t work, one might often also want to change the text colour. Imagine a black image which should have white text, and a fallback background colour of ‘inherit’ or ‘transparent’ (i.e. the parent’s colour) in which case the colour should also be reset to inherit. You dismiss this particular case in your post, but I think it should be carefully considered and an inherent part of the fallback mechanism. If you want this to be generic (which I think is a good idea), there will be many more occurances where different properties have to be set when a resource isn’t loaded. But I hope the CSS WG will consider it, it would be better than creating something that works just for fonts (although fonts ‘shine through’ eachother, like multiple backgrounds with transparent parts, so it’s a slightly different case). This is certainly something that I would like to use right now on my website, as certain text is currently illegible when the image behind it somehow fails to load. ~Grauw -- Ushiko-san! Kimi wa doushite, Ushiko-san!! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Laurens Holst, student, university of Utrecht, the Netherlands. Website: www.grauw.nl. Backbase employee; www.backbase.com.
Received on Monday, 8 May 2006 09:07:23 UTC