W3C home > Mailing lists > Public > www-style@w3.org > January 2012

Re: [css4-ui]/[css4-selectors] Pseudo-class for selecting broken images & other external resources

From: Brian Kardell <bkardell@gmail.com>
Date: Fri, 6 Jan 2012 06:28:49 -0500
Message-ID: <CADC=+jdo37RbuvBajMbJ4KK2x3_mVDNiS1NWKc+jf0abkbL7rg@mail.gmail.com>
To: Matthew Wilcox <elvendil@gmail.com>
Cc: "Edward O'Connor" <eoconnor@apple.com>, www-style@w3.org
On Jan 6, 2012 4:06 AM, "Matthew Wilcox" <elvendil@gmail.com> wrote:
> "img { content: image(attr(src as url), "fallback.png"); }"
> Surely that rule will be applied regardless of whether the image has
loaded or not? CSS inspects the src attribute, not whether it's loaded?

He is illustrating how the  image function accepts fallbacks.  fallback.png
is loaded (hopefully) if the one indicated by the src attr fails.

> Additionally there is a major point being missed here: it's not just
about resource loading from the mark-up, we need control when the CSS image
has not loaded too!

Would work just as well, the image function just wants a list of urls to
attempt (just like url) in order.

> The use case is this: better accessibility in scenario's where an author
is using "image replacement" techniques but the client has images disabled,
or simply didn't load.

The problem worth debating imo is / was more about whether that is all we
need.  It doesn't help with resources in general, just images.
Received on Friday, 6 January 2012 11:29:28 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:09 UTC