[whatwg] The src-N proposal
Tab Atkins Jr.
jackalmage at gmail.com
Tue Nov 19 17:52:22 PST 2013
[sorry for the repeated emails]
On Tue, Nov 19, 2013 at 5:47 PM, Tab Atkins Jr. <jackalmage at gmail.com> wrote:
> On Tue, Nov 19, 2013 at 2:22 PM, Tab Atkins Jr. <jackalmage at gmail.com> wrote:
>> Using a url/size pair in src=''
>> would be invalid if sizes='' wasn't specified.
> On second thought, this isn't necessary. You can always set <img
> width>, or just let it take the default intrinsic width of 300px.
> <picture sizes> would just override the intrinsic width of the <img>.
> After all, even if your image isn't variable-sized, using the url/size
> syntax might still be easier than url/density, because you don't have
> to do any math, or change the densities around when you change the
> image size.
This means, then, that it's actually legitimate to mix url/density and
url/size pairs, so we don't even need separate grammar clauses. The
url/size pairs just get turned into url/[effective density] pairs,
calculated from the intrinsic size (possibly modified by <img width>
or <picture sizes>).
This also means that you can use <picture sizes> and url/density together.
None of these are particularly good ideas, mind you; I'm just saying
that there's no real reason to disallow them, or prevent them from
working with each other. The concepts are actually fairly independent
in terms of operation.
More information about the whatwg