W3C home > Mailing lists > Public > www-style@w3.org > April 2008

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

From: Brad Kemper <brkemper@comcast.net>
Date: Fri, 4 Apr 2008 18:57:24 -0700
Message-Id: <AE7BED49-A5EB-44BA-92DA-BCC1CF879FA1@comcast.net>
Cc: Alan Gresley <alan@css-class.com>, Anne van Kesteren <annevk@opera.com>, www-style@w3.org
To: fantasai <fantasai.lists@inkedblade.net>

On Apr 4, 2008, at 10:22 AM, fantasai wrote:

> Brad Kemper wrote:
>> There might be other styles you would want to change if the image  
>> did not load, besides just background-color. Maybe we need a ":  
>> resources-not-loaded" pseudo-class that could be applied to any  
>> element, class, etc., which would provide fallback properties when  
>> that element contained external resources that did not load (for  
>> whatever reason).
> I think that's getting a little too generic. Most of the time
> if decorative images don't load it's not a big deal. For
> backgrounds it's a readability issue, though.
> The other important one that needs fallbacks is 'content', we're
> handling that by making it take a comma-separated list of values.
>   content: url(hello.png), "hello";
> I guess you could argue that distinguishing between the cases where
> this results in a replaced element (using hello.png) vs. where it's
> just text ("hello") would be useful.
> ~fantasai

I think you misunderstood me a little. I am still talking about cases  
where images, svg, and the like (perhaps even external style sheets)  
don't load, especially when they are used for backgrounds and content  
(the most common use case anyway) for but where other properties are  
set with expectation that they are available. So, for instance:

#myElement {
	background: url(black_shape_with_writing.png) transparent no-repeat;
	color: white;
	content: content;
#myElement:not-loaded {
	background-color: black;
	content: "not loaded yet";
Received on Saturday, 5 April 2008 01:58:05 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:35 UTC