Re: [css3-background] fallback color on background-image

Hello everybody,

I think the fallback should not be located in background-color but in background-image.
In fact, the 'new color' is applied as remplacement image, so it's not exactly a background-color. 

* So what about something like that :
===============================

    background-image: url('myImage.png') / rgba(80, 60, 60; 0.5);
    background: transparent url('myImage.png') / rgba(80, 60, 60; 0.5) repeat;

It's more consistent with the rest of the CSS Modules (font-family; ...) where the fallback occurs in the same property than the unavailable ressource.


* Another syntax can be :
===============================

    background-image: (url('myImage.png'), rgba(...));
    background: transparent (url('myImage.png'), rbga(...)) repeat;

It's more consistent with font-family (comma-separated list) but it needs introducting parenthesis to avoid ',' problems in background.


* We also can have :
===============================

    background-image: firstOf(url('myImage.png'), rgba(...));
    background: transparent firstOf(url('myImage.png'), rbga(...)) repeat;    

(This sample is based on a old 'more-general' proposition I did in the CSS WG)
(The proposal was : firstOf(a,b,c) get replaced in the CSSOM by the first value (a, b or c) that's accepted by the UA for the considerated property)

Regards,
Fremy

Received on Saturday, 21 February 2009 10:51:12 UTC