- From: Kornel Lesiński <kornel@geekhood.net>
- Date: Thu, 17 May 2012 13:39:05 +0100
- To: "Julian Reschke" <julian.reschke@gmx.de>
- Cc: whatwg <whatwg@whatwg.org>
On Thu, 17 May 2012 13:20:03 +0100, Julian Reschke <julian.reschke@gmx.de> wrote: >> So to future-proof the solution I think: >> >> <img src="1x.jpg" srcset="2x.jpg"> >> >> should be equivalent to: >> >> <img src="1x.jpg" srcset="2x.jpg 2x"> >> ... > > As far as I can tell, making descriptors optional breaks the syntax (it > allows comma both in the URI and as a separator between image > candidates). Indeed. I'm not sure which solution is the best: - make descriptors optional only for the last URL (which will work fine for the case where only the 2x image is supplied) srcset="a,b" is a single URL srcset="a, b" is an invalid descriptor for a single URL srcset="a 1x, b" is two URLs @1x and @2x - parse trailing comma in URL as a separator and hope no URL scheme needs it :) srcset="a,b" is a single URL srcset="a, b" is two URLs srcset="a,#, b" is two URLs, first one being "a,#". - introduce some kind of escaping for commas in the URL part: srcset="a,b" two URLs srcset="a\,b" one URL "a,b" srcset="a\\\, , \,b" two URLs "a\," and ",b" -- regards, Kornel Lesiński
Received on Thursday, 17 May 2012 12:39:40 UTC