Re: background-position-x & y

> 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.

Faruk

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