W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2010

[whatwg] Built-in image sprite support in HTML5

From: David Weitzman <dweitzman@gmail.com>
Date: Fri, 21 May 2010 10:12:50 -0700
Message-ID: <AANLkTikmrUmpsdUN4Zq-NnB4WFfm65_v2iMhpIfd1SI6@mail.gmail.com>
There are various approaches to using image sprites with HTML and CSS,
but at the end of the day they are all essentially hacks. A solution
that would be simpler than any existing approach would be to introduce
new attributes for <img> to specify x and y offsets and clipping on
images. With that you would get simpler markup for sprites and better

One downside of this approach is that with background image sprites
you can have a CSS class that abstracts away the name of the sprite
image. With <img> tags you would have to specify the URL and
height/width individually on every sprited image.


- David
Received on Friday, 21 May 2010 10:12:50 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:23 UTC