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

Re: Sprites (was: Background position)

From: Aryeh Gregor <Simetrical+w3c@gmail.com>
Date: Mon, 18 May 2009 18:42:39 -0400
Message-ID: <7c2a12e20905181542u340a0b5aj9871265251d00381@mail.gmail.com>
To: Jorrit Vermeiren <mercator+w3c@gmail.com>
Cc: Sophie <sophie.gousset@laposte.net>, Henrik Hansen <henrikb4@gmail.com>, www-style@w3.org
On Mon, May 18, 2009 at 5:57 PM, Jorrit Vermeiren
<mercator+w3c@gmail.com> 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

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