[whatwg] add html-attribute for "responsive images"

Benjamin Hawkes-Lewis bhawkeslewis at googlemail.com
Wed Feb 8 16:21:56 PST 2012


On Wed, Feb 8, 2012 at 1:52 PM, Mathew Marquis <mat at matmarquis.com> wrote:
>
> 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

Fair enough. I'm not recommending the one pattern over the other at
this point - just saying we do have an additional option.

> —the addition of the non-semantic, non-display <srclist> gives me the creeps

"non-semantic" in what sense?

Why does a "non-display" element give you the creeps?

Do <head>, <meta>, <input type="hidden">, <param>, <source>, <object>
fallback content, and @hidden also give you the creeps?

>  I just feel there’s something to be said for keeping the element consistent and self-contained.

"self-contained" I'll grant, but "consistent" with what?

--
Benjamin Hawkes-Lewis



More information about the whatwg mailing list