- From: Michael[tm] Smith <mike@w3.org>
- Date: Sun, 29 Sep 2013 21:08:27 +0900
- To: "Roy T. Fielding" <fielding@gbiv.com>
- Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, "HTML WG (public-html@w3.org)" <public-html@w3.org>
"Roy T. Fielding" <fielding@gbiv.com>, 2013-09-27 17:44 -0700: > Has anyone considered using URI templates [0] for this, so that the > reference can be described once separately from the ranges? > > It could look something like (back of the napkin example) > > <img src="sunny-72-100-200-p.jpg" > template="sunny-{minppi}-{minw}-{minh}-{orientation}.jpg" > minppi="72 96 163 326" > minw="30 100 500 1024" > minh="60 200 1000 2048" > > That looks a lot more author-friendly to me than the other proposals I've seen so far. > Note that this would declare to the user agent the range of images > available and the effective breakpoints on when to use each one. > The UA chooses from among the values provided for each dimension, > usually by picking the highest value less than or equal to the > image's rendering context (no image is loaded if context is less > than minw or minh). If no attribute is given defining the range of > values, then a standard range could be used. > > The above example has four dimensions with 4x4x4x2 options, which > describes 128 distinct URL references. That would seem to mean that on the server side an author would need to provide 128 different images. I would think that not all the possible combinations for values are likely to be ones that would be used in practice, so it seems like with this syntax, you'd need to some way to express some subset(s) of all the possible combinations. Which I guess is where all of these proposals start to get ugly. --Mike -- Michael[tm] Smith http://people.w3.org/mike
Received on Sunday, 29 September 2013 12:08:36 UTC