Re: background-position-x & y

Faruk Ateş <faruk@apple.com> wrote:
> 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>] );

You shouldn't introduce new stuff inside url(), everything from the u
to the close parenthesis is *one token*, it'll be a nightmare to
implement (it already is; it should never have been specified that way
in the first place).

How about  background-image: <url> <x> <y> <width> <height> ; 

zw

Received on Wednesday, 14 January 2009 20:27:14 UTC