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

L. David Baron wrote:
>
> 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.)

You raised a parsing issue with using slash for both, and disambiguation
is less necessary for color (where always specifying both is a possible
workaround) than it is for background-size (where it would be mixed up
with background-position). So we dropped the slash for color. I don't
like it either, I also preferred the old syntax. If you have a better
solution than dropping the slash, or if you, as an implementor, think
keeping the slash is worth the parsing complexity, then let's reopen
this and resolve it another way. The current resolution was uncomfortable
enough to me that I left it marked in the draft.

~fantasai

Received on Friday, 20 February 2009 20:21:36 UTC