[whatwg] <imgset> responsive imgs proposition (Re: The src-N proposal)
Timothy Hatcher
timothy at apple.com
Fri Nov 15 13:05:51 PST 2013
On Nov 15, 2013, at 12:30 PM, Tab Atkins Jr. <jackalmage at gmail.com> wrote:
> Use-case 1: Variable density.
>
> src-N
> <img src-1="foo.5 .5x, foo1 1x, foo2 2x, foo3 3x" src="foo1">
>
> PreloaderCSS
> <img src="foo1" id="foo">
> <style>
> #foo { content: replaced image-set("foo.5" .5x, "foo1" 1x, "foo2" 2x,
> "foo3 3x"); }
> </style>
The simple case is a case srcset (the DPR parts) solves and I'd argue should be used here instead.
> The simplest one isn't much worse, granted. It suffers from the "put
> an id on it" that makes working with <label>/<input> a minor chore,
> but otherwise is mostly just shifting things around.
Sure you can use ids. But the idea behind the CSS proposal was to allow better sharing of the breakpoint media queries. Using ids doesn't share, using a class would. Src-N you have no choice but to repeat everything everywhere.
> These examples... do not look good.
They look better in an editor. CSS is syntax highlighted. Src-N's format isn't and likely would never be — as most HTML attributes aren't.
— Timothy Hatcher
More information about the whatwg
mailing list