Re: fallback color for background-image (ISSUE-5)

Josef wrote:
> 
> Alan Gresley wrote:
> 
>  > content: "hello" / url(hello.png);
>  > background: blue / url(hello.png), url(goodbye.png), transparent;
>  >
>  > The fall back to the left I think is more intuitive for authors. Also
>  > using commas would mess with multiple background strings. This would
>  > be better.
>  >
> For me it is too ugly.
> And this seems very restricted and not orthogonal in the first place


Please see Issue-5 so you can clearly understand the issue.

http://www.w3.org/Style/CSS/Tracker/issues/5


> Anyway, here a idea with i think is better:
> background: url(hello.png),..., transparent,fallback(blue);


Please see multiple background in the specs.

http://dev.w3.org/cvsweb/csswg/css3-background/Overview.html?rev=1.6#layering


This is already implemented by Safari 3 and Opera 9.50 without any 
propriety prefixes. Multiple backgrounds use comma separated strings 
which you have used above. A Test case for multiple backgrounds.

http://css-class.com/test/css/backgrounds/multiple-backgrounds.htm


The fall-back or fall-forward switch must be something that non 
supporting implementations will throw out such a background like this 
test case.

http://css-class.com/test/css/backgrounds/background-switch.htm

The CSS is.

#container {
border:2px solid blue;
background: red / url(../../../images/examples/css3backc.png);
border-bottom:2px solid green;
height:200px;
width:200px;
}

Gecko 1.7 to 1.9, IE6 to IE8, Safari 3 and Opera 9.50 will just show a 
box with the borders as blue and the border-bottom green. What operates 
as a switch can not interfere with the parsing of the property and value 
appearing before or after the background string that is thrown out.

Testing in IE5.5 shows a red background and the borders (no harm done). 
Opera 9.10 to 9.25 will show the borders, red background and the 
transparent image. Since Anne proposed this switch (Which I really 
like), I hope he can assure that Opera 9.50 quickly replaces all the 
earlier versions of Opera in the wild. :-)


Alan

http://css-class.com/test/

Received on Sunday, 6 April 2008 13:04:36 UTC