Re: background-position-x & y

On Jan 13, 2009, at 3:38 PM, Tab Atkins Jr. wrote:

> PS: Just because I can, an easy solution would be nothing more than a
> "sprite( url, xstart, xlength, ystart, ylength)" value that could be
> used anywhere the url() syntax is allowed to specify a picture.  This
> simple solution isn't ideal in a few ways, but it would be *as usable*
> as the current hack, and add the powers that I described above which
> the hacks currently lack.  Implementation would be roughly similar to
> Webkit's current handling of CSS gradients.

Hmm,  you're right, I see your point.  In essence, you want to define  
x1, x2, y1, y2 explicitly and have the browser ignore all other parts  
of the sprite image. That does make sense.

In lieu of backwards compatibility though, perhaps a sprite(…) value  
could instead be done as such:

url( <path> [, <x1, x2, y1, y2>] );


That might alleviate possible complications with introducing a new  
sprite() syntax.

- Faruk

Received on Wednesday, 14 January 2009 20:15:07 UTC