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

Re: background-position-x & y

From: Faruk Ates <faruk@apple.com>
Date: Thu, 15 Jan 2009 13:12:59 -0800
Cc: www-style@w3.org
Message-id: <8F99A49E-8705-408C-B17E-F15B3E1A08E0@apple.com>
To: Zack Weinberg <zweinberg@mozilla.com>

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 GMT

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