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

John Mellor johnme at google.com
Tue Nov 12 11:04:59 PST 2013

On Tue, Nov 12, 2013 at 6:54 PM, Adam Barth <w3c at adambarth.com> wrote:

> On Tue, Nov 12, 2013 at 10:45 AM, John Mellor <johnme at google.com> wrote:
> > - Doesn't address viewport-switching (variable-sized images), though we
> may
> > be able to fix that by extending image-set to support src-N's
> > <viewport-urls> syntax.
> Why doesn't it support variable-sized images?  In example above, one
> of the cases is 30x30 and the other is 60x60.  Maybe I've
> misunderstood what you mean by variable-sized images?

In most responsive designs, there are images whose resolution depends on
both the viewport width and the devicePixelRatio. Your approach technically
allows handling both, by combining max-width and max-resolution MQs, but if
you have 6 widths and 4 dprs, you have to write 24 separate MQs, for every
combination. This is the same problem srcset's "w" unit had; see
xanthir.com/b4Su0 for a clear explanation, and compare the extreme
verbosity (and incomprehensibility) of the srcset example there, with the
much simpler equivalent src-1.

More information about the whatwg mailing list