- From: Markus Ernst <derernst@gmx.ch>
- Date: Wed, 13 Nov 2013 23:53:03 +0100
- To: John Mellor <johnme@google.com>
- Cc: Silvia Pfeiffer <silviapfeiffer1@gmail.com>, Adam Barth <w3c@adambarth.com>, whatwg <whatwg@lists.whatwg.org>, Christian Biesinger <cbiesinger@google.com>, "Jukka K. Korpela" <jkorpela@cs.tut.fi>, Ryosuke Niwa <rniwa@apple.com>, Markus Lanthaler <markus.lanthaler@gmx.net>
Am 13.11.2013 14:52 schrieb John Mellor: > <style> > @media (max-width: 19.99em) { > .artdirected { content: replaced image-set(128px; attr(srcs-smallicon)); > } > } > @media (min-width: 20em) { > .artdirected { content: replaced image-set(100% (30em) 50% (50em) 33%; > attr(srcs-flexwidth)); } > } > </style> > ... > <img class="artdirected" src="fallback.jpg" > srcs-smallicon="i64.jpg 64, i128.jpg 128, i256.jpg 256" > srcs-flexwidth="160.jpg 160, 320.jpg 320, 640.jpg 640, 1280.jpg 1280, > 2560.jpg 2560"> > > (note that the above is a maximally complex example, incorporating art > direction, viewport-switching and dpr-switching; most normal cases would be > simpler than this) Looks great to me. Just verbose enough to be understood by average authors (as I am one), perfectly maintainable, and as powerful as src-N.
Received on Wednesday, 13 November 2013 22:53:34 UTC