- From: Mikko Rantalainen <mikko.rantalainen@peda.net>
- Date: Tue, 29 Mar 2005 13:55:47 +0300
- To: www-style@w3.org
David Woolley wrote: >>background-color: #fff; /* white bg in div */ >>color: $fff; /* white text in header */ >>background-image: url(cool.png); /* a dark yet transparent image */ >>background-standin-colour: #000 ; /*the bg will be black till image > > This doesn't degrade gracefully. If you set a foreground colour, you > must set a background colour that contrasts, and you must do using the > same generation of CSS attributes as used to set the foreground colour. I understand the issue but I think the suggested solution is approaching the problem from wrong direction. What we already have: text color: 'color' background image: 'background-image' background color in case background cannot be/will not be/hasn't yet been loaded: 'background-color' What we don't have: a method to remove background color in case background image has been successfully loaded. I suggest following solution 1) Add additional optional keyword 'replace' 'background-image' Value: <uri> | <uri> replace | none | inherit 2) Allow this keyword also in the 'background' shorthand notation Behavior for the new keyword 'replace': If the resource pointed by <uri> can be successfully loaded *and* can be successfully displayed by UA, then the resource pointed by <uri> replaces the normal background of element. The properties background-position etc. still apply. -- Mikko
Received on Tuesday, 29 March 2005 10:55:51 UTC