[whatwg] responsive images

Julian Reschke julian.reschke at gmx.de
Tue May 22 08:31:04 PDT 2012


On 2012-05-22 17:02, Glenn Maynard wrote:
> (I wish people would stop starting new threads about the same topic.)
>
> On Tue, May 22, 2012 at 5:53 AM, Paul Court<paul at pmcnetworks.co.uk>  wrote:
>
>> As a HTML author and programmer, I just cannot see myself implementing the
>> current srcset proposal on sites. As a programmer, it has very much got
>> what we would call a "bad code smell".
>>
>> <img src="face-600-200 at 1.jpeg" alt="" srcset="face-600-200 at 1.jpeg 600w
>> 200h 1x, face-600-200 at 2.jpeg 600w 200h 2x, face-icon.png 200w 200h">
>>
>
> Actually, it's pretty clean; you've just made it ugly by sticking it all on
> one line.
>
> <img src="face-600-200 at 1.jpeg" alt=""
>       srcset="face-600-200 at 1.jpeg 600w 200h 1x,
>               face-600-200 at 2.jpeg 600w 200h 2x,
>               face-icon.png       200w 200h">
>
> It's no uglier than CSS syntaxes like background.

It may not be uglier but it's much more fragile as the examples and the 
prose in the spec give the impression that you can use the "," to 
tokenize, which would be incorrect.

> ...

Best regards, Julian



More information about the whatwg mailing list