[whatwg] <imgset> responsive imgs proposition (Re: The src-N proposal)

Tab Atkins Jr. jackalmage at gmail.com
Tue Nov 12 07:52:51 PST 2013

On Tue, Nov 12, 2013 at 5:33 AM, Ryosuke Niwa <rniwa at apple.com> wrote:
> On Nov 12, 2013, at 4:11 PM, Adam Barth <w3c at adambarth.com> wrote:
>> On Tue, Nov 12, 2013 at 12:08 AM, Jukka K. Korpela <jkorpela at cs.tut.fi> wrote:
>>> 2013-11-12 9:58, Adam Barth wrote:
>>>> Unfortunately, we can't add new tags to head.  If the parser sees a
>>>> tag it doesn't recognize in the head, it creates a fake body tag and
>>>> pushes the tag down into the body.
>>> But you could use <style type=text/foobar>...</style>, with a suitable value
>>> for foobar, like x-imgset. This could even be handled with a polyfill in old
>>> browsers (JavaScript code that reads such elements and interprets their
>>> content).
>> Maybe there's a CSS solution to this problem?  Do we just need to make
>> the preload scanner smarter about interpreting CSS?
> In fact, I’d argue that CSS will be a better fit to address art direction use case since it’s purely presentational.

Only insofar as literally this entire feature is presentational.

> We could define some ways to list set of images that could be replaced for a given img element in HTML and then let CSS pick which one to use for example.

No, we can't gate any of the major use-cases behind a time barrier
(waiting for external CSS to come in) like that.  That defeats the
entire point; at that point, you might as well just solve it in


More information about the whatwg mailing list