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

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

From: L. David Baron <dbaron@dbaron.org>
Date: Fri, 20 Feb 2009 11:27:55 -0800
To: CSS WG <www-style@w3.org>
Message-ID: <20090220192755.GA16200@pickering.dbaron.org>
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


L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/
Received on Friday, 20 February 2009 19:28:30 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:24 UTC