W3C home > Mailing lists > Public > public-respimg@w3.org > October 2012

src and srcset

From: Marcos Caceres <marcosscaceres@gmail.com>
Date: Thu, 4 Oct 2012 16:48:16 +0100
To: public-respimg@w3.org
Message-ID: <E2B3F048B94A438A97F5BD697844F781@gmail.com>
I'm wondering, do we *really* need to add a srcset attribute to the <source> element when used with <picture>? Can't we just reuse @src and say it takes an "image candidate string" [1].

The advantages of just using <source>'s src attribute are:

1. we don't need to add a new attribute to <source>. 

2. we avoid conflicts and confusion between @srcset and @src on <source>.

3. The 'image candidate strings' are a superset of valid URLs anyway, so it does not affect backwards compat.

4. the <source> element outside the context of <audio> and <video> does not mean anything in legacy/current HTML5 UAs - hence, we are free to reinterpret it slightly in the new context.


[1] http://dev.w3.org/html5/srcset/#image-candidate-strings 
Received on Thursday, 4 October 2012 15:48:43 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:12:39 UTC