by user24 · 14y ago · 0 comments
Yeah, stuff like "2x 100w" looks a bit like magic numbers[1]
Also there's potential for confusion in 'x' - does it mean X as in a co-ordinate i.e. width, or zoom? I'd rather see something more verbose like this:
<img src="foo.jpg">
<set src="foo1.jpg" width="100">
<set src="foo2.jpg" density="2">
</img>
Yes it's more wordy to write, but you read code more than you write it so it makes sense to optimise for readability over byte-shaving. <setsrc>
<img src="foo.jpg">
<set src="foo1.jpg" width="100">
<set src="foo2.jpg" density="2">
</setsrc>
Always be wary of allowing arguments that hinge on "it's not technically possible" to shut down good ideas. <imgset>
<img src="foo.jpg">
<img src="foo1.jpg" width="100">
<img src="foo2.jpg" density="2">
</imgset>