[whatwg] add html-attribute for "responsive images"
Mathew Marquis
mat at matmarquis.com
Wed Feb 8 05:52:23 PST 2012
On Feb 8, 2012, at 8:38 AM, David Goss wrote:
> <picture alt="alternative text" src="default.jpg">
> <source href="medium.jpg" media="min-width:400px" />
> <source href="large.jpg" media="min-width:700px" />
> <img alt="alternative text" src="default.jpg" />
> </picture>
>
> Becomes this:
>
> <img alt="alternative text" src="default.jpg" list="myimage" />
> <srclist id="myimage">
> <source href="medium.jpg" media="min-width:400px" />
> <source href="large.jpg" media="min-width:700px" />
> </srclist>
This feels a bit convoluted to me, to be honest—the addition of the non-semantic, non-display <srclist> gives me the creeps. It also leave us with two different markup patterns that serve the same goal, though not radically different by any means. Don’t get me wrong: I’d be okay with this pattern—hell, I’m receptive to any potential solution. I just feel there’s something to be said for keeping the element consistent and self-contained.
More information about the whatwg
mailing list