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

Re: background-position-x & y

From: Faruk Ateş <faruk@apple.com>
Date: Wed, 14 Jan 2009 13:03:55 -0800
Message-id: <27126C42-5455-4F1E-BC16-8D20D29617BC@apple.com>
To: www-style@w3.org

On Jan 14, 2009, at 12:41 PM, fantasai wrote:

>> 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).
>
> Agreed. sprite() is much preferable to extending url().
>
>> How about  background-image: <url> <x> <y> <width> <height> ;
>
> No. a) That'd create parsing ambiguities in the background shorthand  
> and
>    b) It doesn't allow use of sprites for other things like list- 
> style-image.

In that case (responding to both bits above), the sprite()  
functionality should probably be defined as _overriding_ any url()  
values that might be set, or it might get really convoluted. Doing so  
would also mean good backwards compatibility, e.g.:

background-image: url(foo.png);
background-image: sprite(my_sprite.png, 10px, 20px, 10px, 11px);

Browsers that support the sprite() value would use the sprite image  
for the background instead of the url()-specified one. It'd be similar  
to rgb() and rgba().

- Faruk
Received on Wednesday, 14 January 2009 21:04:37 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:15 GMT