O'Reilly logo

Sass and Compass in Action by Wynn Netherland, Nathan Weizenbaum, Chris Eppstein, and Brandon Mathis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. Basic Sass syntax

This chapter covers

  • Reusing colors, lengths, and other values with variables
  • Adding structure to your CSS by nesting rules
  • Writing maintainable stylesheets by distributing them among multiple files
  • Reusing entire styles with mixins and inheritance

Sass’s SCSS syntax is a superset of the syntax of CSS3. This means that if can read and write CSS, you already know the basics of how to read and write Sass.

On top of CSS, Sass adds new features and new syntax that let you express more styles more clearly with less writing. Some Sass additions are designed to be easy to understand for people who understand CSS, even without having seen Sass before. Most of them require some explanation, though, which is what this ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required