[whatwg] New responsive images proposal
mat at matmarquis.com
Thu Nov 21 07:22:58 PST 2013
On Nov 21, at 8:50 AM, Mateus Souza wrote:
> Agree, but maybe a new tag element can do the trick, or an adaptation of
> the picture element could be a better solution.
> <source src="large.jpg" media="screen and (min-width: 800px)" alt="Larger"
> height="500" width="500" />
> <source src="small.jpg" media="screen and (max-width: 300px)" alt="Small"
> height="200" width="200" />
Unfortunately `image` is a common alias of `img`, which doesn’t allow child elements—it’ll close itself upon encountering the next tag. In order to avoid that, we’d need a new unencumbered element name.
You’re actually following the line of reasoning that led up to the original `picture` proposal, which is oddly comforting to see. You might get a kick out of reading through http://etherpad.mozilla.org/responsive-assets, where the proto-RICG originally started throwing ideas around.
> My ideai is just make all attributes responsive, and today, i do not see a
> *Mateus Souza - Webdeveloper Freelancer*http://mateussouzaweb.com |
> @mateussouzaweb <https://twitter.com/mateussouzaweb>
> 2013/11/21 James Graham <james at hoppipolla.co.uk>
>> On 21/11/13 13:07, Mateus Souza wrote:
>>> <img src="large.jpg" media="screen and (min-width: 800px)"...
>>> <img src="small.jpg" media="screen and (max-width: 300px)"...
>> This appears cause multiple images to load in the case that this feature
>> isn't supported (i.e. in all current browsers). That isn't an acceptable
>> fall back behaviour.
More information about the whatwg