[whatwg] Defaulting new image solution to 192dpi
Julian Reschke
julian.reschke at gmx.de
Thu May 17 05:53:40 PDT 2012
On 2012-05-17 14:39, Kornel Lesiński wrote:
> On Thu, 17 May 2012 13:20:03 +0100, Julian Reschke
> <julian.reschke at 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
Ugly.
> - 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,#".
Ugly.
> - 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"
Likely to be confusing because it's only needed in edge cases.
Or:
- delimit URIs in text content with "<" and ">" as suggested by RFC 3986
(<http://greenbytes.de/tech/webdav/rfc3986.html#rfc.section.C>).
- don't use a microsyntax
Best regards, Julian
More information about the whatwg
mailing list