Re: the future of css sprites

It has already been proposed, in the form of a
sprite(<url>,<x0>,<y0>,<x1>,<y1>) functional notation, that would be
allowed anywhere type <image> is allowed
I personally would be prefer your approach for background-image, that
is consistent with the "crop" property ([1] and [2]) for replaced
content.
AFAIK, the only properties concerned are "content", "background-image"
and "list-style-image". This means that you only need "crop" and
"background-crop" (for "list-style-image" use ::marker {content:
url(image.png); crop: <x> <y> <width> <height>; } ).

Giovanni

[1] http://www.w3.org/TR/2002/WD-css3-box-20021024/#the-crop
[2] http://www.w3.org/TR/css3-content/#the-crop and
http://dev.w3.org/csswg/css3-content/#the-crop

2009/3/6 Niels Matthijs <niels.matthijs@internetarchitects.be>:
> 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
>
> http://www.onderhond.com/blog/work/the-future-of-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?
>
> Greets,
> Niels Matthijs
>

Received on Friday, 6 March 2009 14:13:03 UTC