[webkit-dev] The SrcN responsive images proposal

Dean Jackson dino at apple.com
Wed Nov 6 09:39:09 PST 2013

On 5 Nov 2013, at 9:55 am, Timothy Hatcher <timothy at apple.com> wrote:

> On Nov 5, 2013, at 2:18 AM, John Mellor <johnme at chromium.org> wrote:
>> <img srcset="(min-width: 640px) 0.5x photo at 0.5x.jpg, 1x photo at 1x.jpg, 2x photo at 2x.jpg || 0.5x photo-crop at 0.5x.jpg, 1x photo-crop at 1x.jpg, 2x photo-crop at 2x.jpg">
> I prefer this over multiple attributes. It is a syntax that needs little explanation before you can read it and use it. It also expands the existing srcset instead of confusing things with other attributes.
> srcN is also too fiddly. If you want to add a higher precedent srcN, you need to reorder all the existing srcN attribute names. With srcset you just need to edit a single attribute's value, adding a logic operator between the rules.

This is a great point.

Also, we should be mindful that whatever solution should be vaguely applicable to other contexts where you’re selecting resources based on resolution, etc, such as video and CSS properties. I don’t want an explosion of attributes everywhere, and I don’t even know how you’d do that in CSS (background-image-1, background-image-2, …)


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20131106/00107650/attachment.html>

More information about the webkit-dev mailing list