Re: Sprites (was: Background position)

On Mon, May 18, 2009 at 5:57 PM, Jorrit Vermeiren
<> wrote:
> I propose the introduction of an @sprite rule, which can be used to
> define the sprite matrix of a single image:
> @sprite <id> {
>    sprite-image: <image>;
>    sprite-offsets-x: <number>+;
>    sprite-offsets-y: <number>+;
> }

It seems like a simpler syntax would be more like

@sprite <id> { <image>; <number>+; <number>+ }

There's no need for explicit property-like names in a special at-rule like this.

This seems cleaner and easier to use than the other CSS sprite
proposals I've seen.  It's somewhat inflexible, but that's not likely
to be a big issue for the most part, and you could always mix it with
other approaches.

Received on Monday, 18 May 2009 22:43:16 UTC