Chapter 2 Getting started with Sass and Compass
In Chapter 2 of the Sass and Compass book 'Sass and Compass for Designers' you will learn all the fundamentals necessary to create a solid foundation for all future Sass and Compass projects.
You'll learn:
- How to configure Compass projects and amend the Compass config file
- How to change the formatting of the CSS that Sass generates
- The different comment types available in Sass
- How to create and use variables
- How to create a custom 'base' Sass and Compass project that can be used as a starting point for future projects
Oh, we'll also cover the merits of The Karate Kid too.
We will learn to use variables like this:
$i-am-a-variable: red;
How to use different comment types:
// Like this
/* And like this */
/*! And LOUD comments like this */
Understand the Compass config.rb settings:
http_path = "/"
css_dir = "css"
sass_dir = "sass"
images_dir = "img"
javascripts_dir = "js"
fonts_dir = "css/fonts"
Learn how to make and use 'partial files':
@import "partials/header";
Look like a cone-headed genius by creating projects from the command line:
compass create --sass-dir "sass" --css-dir "css" --javascripts-dir "js" --images-dir "img"
With the Sass and Compass organisation techniques mastered it's time to get cracking on the good stuff.
You can buy 'Sass and Compass for Designers' at any of these fine outlets: