r/csshelp • • Apr 27 '14

How do I edit the spritesheet?

Another mod in /r/lewronggeneration handled the flairs, but now he's been shadowbanned. All I have now is a link to the spritesheet and no idea how to add more stuff to it.

6 Upvotes

2 comments sorted by

4

u/SinisterChef Apr 27 '14 edited Apr 27 '14

If you have to add images in that sprite sheet keep them in the same table layout, then you have to manipulate the background position property of a new class that you define and find the position of your new image to where it is to the top left corner of that sprite sheet. Let's use the .flair-rabbit class as an example the background position for this class is "background-position: -271px -316px" what this is saying is that the location of the rabbit sprite on this image is 271px to the left and 316px from the top and with the defined height and width set to a small square all that shows through is that rabbit based on how you manipulated where the image position begins. Try opening a flair icon in your developer tools and change the background position and you'll see the image move up and down.

2

u/lecherous_hump Apr 27 '14

I'm curious about flair and sprite sheets in general, if whoever answers wouldn't mine giving (or linking to) a quick primer. (Note that I haven't even looked this up myself yet, just being lazy since someone happened to post on this exact topic p).