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

Re: [css4-images] Type hinting in image()

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Thu, 03 Jan 2013 18:18:26 +0100
To: Jake Archibald <jaffathecake@gmail.com>
Cc: W3C CSS Mailing List <www-style@w3.org>
Message-ID: <m2fbe89si3nif19a3ob4714b5v5984377n@hive.bjoern.hoehrmann.de>
* Jake Archibald wrote:
>background: image('whatever.webp', 'whatever.png');
>
>Currently the browser would download whatever.webp even if it doesn't
>support it. Could image-tags be extended to allow type hinting? Eg...
>
>background: image(image/webp 'whatever.webp', 'whatever.png');
>
>...where the browser wouldn't make a request for whatever.webp if it
>didn't accept the image/webp type, similar to how @font-face uses
>format().

A bare media type would probably be insufficient if you consider the
history of the two formats in your example (some implementations did
support PNG but not alpha channels, and in case of "WebP", loss-less
compression and transparency are relatively new features). It might
be wise to plan ahead and allow for a more flexible syntax if such a
feature was introduced.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Thursday, 3 January 2013 17:18:53 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:04 GMT