ElkArte Community

Elk Development => Theme development => Topic started by: live627 on July 31, 2014, 02:16:33 am

Title: Image spriites
Post by: live627 on July 31, 2014, 02:16:33 am
Because saving requests. Fewer of those is better, yeah?
Title: Re: Imag/e spriites
Post by: emanuele on July 31, 2014, 04:55:57 am
Yes... and maybe.

Yes, more sprites, more saving.
Though, from what I have seen (also considering Curve), sprites can be difficult to deal with for people that want to customize the look (at least those that don't know enough about css).
Then there is the additional code and duplication to support (simple) customizations: the message icons have alternative code depending if the customs are on or off, if off they use sprites and styles, if on an img is sent out.

I think in the end it's a kind of balance: there are places where it makes sense, others in which keep the images separated is easier (see the smiley for example).

Actually in some places I think we experimented using base64 encoded images, in some places may work as well, in others we got complains because it may not be crystal clear what to do with that string (people tend to copy what they see, and convert an image to a base64 encoded image could be less easy than just replace the image).