Re: background-position-x & y

On Jan 13, 2009, at 2:23 PM, fantasai wrote:
> Jethro Larson wrote:
>> On Wed, Nov 12, 2008 at 7:39 AM, Aryeh Gregor <Simetrical@gmail.com  
>> <mailto:Simetrical@gmail.com>> wrote:
>> > Sprites are a terrible hack.  CSS shouldn't make any attempt to
>> > support them.  CSS sprites should be obviated, for preference, by
>> > browsers loading all images simultaneously, negating the  
>> performance
>> > advantage of sprites.  (Possibly only if the server requests this
>> > somehow, if causing server load is an issue.)  There is no possible
>> > justification for trying to support an interface where authors are
>> > supposed to manually concatenate images and manually specify  
>> offsets
>> > in CSS rather than treating the images as the logically separate  
>> units
>> > they actually are.  CSS sprites might be useful now, but that's a  
>> bad
>> > situation, not one that anyone should be trying to perpetuate.
>> Sprites are not a hack, they are an optimization that will always  
>> improve download size, and almost always improve performance. That  
>> is why sprites were used on games of the past and that's why  
>> they're used now (e.g. texture mapping). Three 10px X 10px images  
>> will almost always be larger than one 30px X 10px image add to that  
>> the cost of separate http requests, and system memory, and there's  
>> a big difference.
>
> I don't think sprites are a hack, but using background-position for
> them /is/ a hack. There isn't really an alternative yet,  
> unfortunately.


Background-position is by far the closest approximate to how sprites  
were implemented / utilized in other, prior areas however, so even  
though yes, it's a hack, it's only really half a hack due to the lack  
of alternative.

To counter, though: I don't think there really ought to be an  
alternative for this. The implementation of any alternative would be  
almost exactly like using background-position and the value of adding  
a dedicated approach seems really small to me.

Faruk

Received on Tuesday, 13 January 2009 23:12:50 UTC