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

Re: background-position-x & y

From: Faruk Ateş <faruk@apple.com>
Date: Thu, 05 Feb 2009 13:08:35 -0800
Cc: "L. David Baron" <dbaron@dbaron.org>, "Tab Atkins Jr." <jackalmage@gmail.com>, www-style@w3.org
Message-id: <6CEF7B51-1394-4B74-BE76-1C64C58DED8D@apple.com>
To: Jorrit Vermeiren <mercator+w3c@gmail.com>

> I see one possible drawback to this approach. Doing sprites now, you
> typically only define the background image URI once, and only need to
> specify the background-position property for all the alternatives
> (e.g. see the first post in this thread:
> http://lists.w3.org/Archives/Public/www-style/2008Nov/0279.html).
> Would such inheritance still be possible using this function notation?

You make a good point; perhaps it would be more useful to have this  
sprite syntax:

background-image: sprite(x-start, y-start, x-end, y-end[, url(path)]);

With the fifth parameter having to be set only once if desired.

I know the initial gut reaction to this is probably "but that would  
allow people to specify four coordinates without an image being set  
and that's confusing!"  but this is no more or less confusing than the  
ability and current practice of simply setting background-position: x  
y; for sprites and nothing else. Besides, we can specify all  
background properties as it is, without them making sense when  
background-image isn't specified, so that's nothing new there.

Received on Thursday, 5 February 2009 21:09:16 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:24 UTC