W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2012

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

From: Bronislav Klučka <Bronislav.Klucka@bauglir.com>
Date: Wed, 08 Feb 2012 11:40:40 +0100
Message-ID: <4F325128.7090403@bauglir.com>


On 8.2.2012 11:24, David Goss wrote:
> I share your skepticism. It would be nice and neat if there was a 
> <media> element with a common structure for images, video and audio, 
> but clearly the <video> and <audio> elements are too well established 
> already. No sense in rocking that boat now. 

This could always be introduces specifically for responsive media

<media alt="My new cool car">
<source src=my_cool_car.ogg" type="video/ogg" media="min-width: 200px" />
<source src=my_cool_car.mp4" type="video/mp4" media="min-width: 200px" />
<source src=my_cool_car_small.ogg" type="video/ogg" media="max-width: 
200px" />
<source src=my_cool_car_small.mp4" type="video/mp4" media="max-width: 
200px" />
<source src="my_cool_car.png" media="min-width: 200px" />
<source src="my_cool_car_small.png" media="max-width: 200px" />
<img src="my_cool_car_fallback.gif" alt="My new cool car" />
</media>

Brona
Received on Wednesday, 8 February 2012 02:40:40 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:39 UTC