Compass is a library of mixins, functions, and other useful extensions to Sass. Chris Eppstein created Compass and maintains it to this day. Compass is a toolkit that any Sass-master should have handy. Because of its value in Sass development, we’ve devoted a whole chapter to some of its features—but it’s a mere sampling of what Compass has to offer. Check out the Compass website for more.[8]
Make sure RubyGems is up-to-date, then install the Compass gem.
gem update --system gem install compassThen, compile your style sheets with --compass.
sass --compass myfile.scss myfile.css sass --compass --watch .Here’s a summary of what we’ll look at in this part.
First, we’ll look at how to set up a Compass project in Task 25, Setting Up for a Compass Project.
We’ll see how much easier it is to reset your CSS using Compass in Task 26, Resetting: Much Easier with Compass.
We’ve got two nifty ways of playing about with lists in Task 27, Sprucing Up Your Lists, and Task 28, Making Lists Horizontal.
In Task 29, Sticking a Footer to a Window, we’ll see how much easier it is to make a sticky footer using Compass.
We make sure our floats clear correctly in Task 30, Stopping Overflow with Clearfix.
Next we’ll see how to shorten long blocks of text using ellipses in Task 31, Truncating Text Using Ellipses.
We’ll expand items to fit inside a box in Task 32, Stretching Elements.
Want a much simpler, more concise way of creating tables? You can find the solution in Task 33, Jazzing Up Layouts with Columns.
And finally, we’ll look at converting separate images into one big image in Task 34, Spriting.