r/cssnews Nov 14 '11

CSS Change: We're moving our static files to S3 and the sprites are getting some love.

We're going to be moving almost all of our static files to Amazon S3 so that they can better handle load. Some changes were necessary in our frontend to facilitate this.

A bunch of images were added to the sprite, including the default subreddit header.

  • The layout of the sprite image was improved to reduce wasted space caused by these new, larger, images. See: old sprite vs. new sprite.
  • Places that used the existing sprites had to be modified to support the denser packing of sprites. Most of these were changed to look like :before psuedo-selectors with a background image.

You can see the new code live on lab.reddit.com to test out. We're hoping to roll this out this evening PST (Nov 14) or tomorrow morning (Nov 15).

EDIT: This code is now rolled out and lab is turned off again. If you run into any issues, feel free to come bug me over in the /r/changelog post about this.

4 Upvotes

5

u/sodypop Nov 15 '11

Super important question: What is to become of triforce.gif?

4

u/spladug Nov 15 '11

I... what? I guess the only option is to put that on S3 as well. Can't go breaking these things.

Here ya go: http://www.redditstatic.com/triforce.gif :D

(In general, if you're using a www.reddit.com/static/... link somewhere, you can point at www.redditstatic.com/... instead.)

2

u/[deleted] Nov 15 '11 edited Jul 08 '23

[deleted]

2

u/spladug Nov 15 '11

It's a homegrown spriter. I'll link you to the new version in the open source repo when we roll it out.

2

u/spladug Nov 15 '11

We're live! You can now see the spriter on GitHub.