W3C home > Mailing lists > Public > www-style@w3.org > March 2009

the future of css sprites

From: Niels Matthijs <niels.matthijs@internetarchitects.be>
Date: Fri, 6 Mar 2009 12:31:28 -0000
Message-ID: <EAD6F36F8B8A124FB32D722A828211FD07A05C9B@win-s-manc3.shared.ifeltd.com>
To: "www-style CSS" <www-style@w3.org>
Hi all,

I've been ignoring css sprites for some time now because they simply don't work well in em designs. I've been looking into future developments of css and while I did find some improvements there weren't any real breakthroughs concerning css sprites.

Which is a shame, because all that is needed is a background crop function, to crop a certain parts from you sprite. Only the cropped part should be shown, and could then be positioned as wanted. I made up a little syntax myself to demonstrate what it should be able to do, but be reminded that it was thought up in less than a minute and is not really a syntax proposal:

a {background-crop:0px 0px 8px 8px}
a:hover {background-crop-origin:8px 8px;}

The first two values represent the origin point (upper left corner of the area to crop), the last two values represent the length across the x and y axis. For more info, I've written a little blog post about my issues with css sprites


My question is this: did I miss anything, is there already some way of doing what I want to do and if not, do you think it is a good idea to implement such a feature?

Niels Matthijs
Received on Friday, 6 March 2009 12:34:57 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:24 UTC