25 Mar '12, 10pm
ASCIIcast 334 - Compass & CSS Sprites
If all we want from Compass are the CSS3 conveniences then we could use Bourbon instead as we showed in episode 330 . Compass provides much more, though, including CSS sprites. CSS sprites are a technique for combining a number of small images into one larger image and then using CSS to show just a part of each image. On our page we have a row of icons that let you subscribe to Railscasts in a variety of ways. Each of these icons is a separate image which means that a separate HTTP request will be made to get each one. It’s good practice to reduce the number of requests that a page makes. It we merge all these icons into one file we can use CSS to display a selected part of that image for each icon.