[webkit-dev] The SrcN responsive images proposal
timothy at apple.com
Tue Nov 5 09:55:23 PST 2013
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.
— Timothy Hatcher
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev