W3C home > Mailing lists > Public > www-style@w3.org > February 2009

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

From: David Hyatt <hyatt@apple.com>
Date: Fri, 20 Feb 2009 14:29:01 -0600
Cc: CSS WG <www-style@w3.org>
Message-id: <33C44DDA-A4D6-4F33-B893-94FBFF5C5970@apple.com>
To: "L. David Baron" <dbaron@dbaron.org>
On Feb 20, 2009, at 1:27 PM, L. David Baron wrote:

> On Friday 2009-02-20 10:44 -0800, Brad Kemper wrote:
>>
>> On Feb 20, 2009, at 10:27 AM, David Hyatt wrote:
>>
>>>> I'll look into changing the test, but I have to say that
>>>> "background: red
>>>> pink" is really unintuitive. Even after reading the spec I don't
>>>> fully
>>>> understand what it does. Shouldn't it be on the background-image
>>>> property?
>>>> It seems it would cascade badly if set on backgrond-color, too.
>>>
>>> I'd be for just removing this feature from the CSS3 draft.  I think
>>> it's really weird and not particularly useful.
>>
>> I agree that it is not particularly useful to have a fallback for
>> background-color. Ever for rgbs colors, a UA that doesn't support it
>> seems unlikely to support the newer fallback format.
>
> The fallback isn't about syntax.  It's about using the fallback
> color when images fail to load or have not loaded yet.
>
> For example, if you have a background image that has some
> transparency, but if the image isn't supported, is still loading, or
> the user has images disabled, you'd prefer a color rather than
> having complete transparency, you can do:
>
>  background-image: whatever;
>  background-color: transparent blue;
>
> (I'd also note that I preferred the old syntax, where the fallback
> was separated by a '/', but the group decided it was more important
> to use the '/' to separate 'background-size' in the 'background'
> shorthand than to separate the colors.  I don't care enough to
> object.)
>
> -David

What if some subset of multiple background images fails to load?  Do  
you only show the fallback color if all of the images fail to load?   
If so, then this doesn't seem that useful in the presence of multiple  
background images, and I think the syntax without the / is just strange.

I'd love to just see this cut.

dave
Received on Friday, 20 February 2009 20:29:43 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:16 GMT