Re: background-position-x & y

On Jan 14, 2009, at 1:44 PM, Zack Weinberg wrote:
> Faruk Ateş <faruk@apple.com> wrote:
>> 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.
>
> Can't we just use the usual last-setting-wins,
> ignore-properties-with-unrecognizable-value rules for that?

That's essetially what I meant, yes. Sorry, I should have specified  
that more clearly.


>> background-image: url(foo.png);
>> background-image: sprite(my_sprite.png, 10px, 20px, 10px, 11px);
>
> I am opposed to changes that introduce new places where you don't have
> to put quotation marks around a URL, as each such place requires
> special-casing in the grammar.  (Also, "," can legitimately appear in
> a URL.) Either of
>
> sprite(<string>, ...)
> sprite(<uri>, ...)
>
> would be fine, with <string> my preference to minimize typing.


I like David's proposal for syntax, which also alleviates your concern  
I believe:

background: image(url(foo.png), 25, 25, 300, 300);


I wonder if "image()" is too ambiguous though?  The thing I like about  
"sprite()" is that its name implies a distinct image area as part of a  
larger image.

Faruk

Received on Thursday, 15 January 2009 21:13:49 UTC