O'Reilly logo

Beginning CSS Preprocessors: With SASS, Compass.js, and Less.js by Anirudh Prabhu

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

image

Introduction to Sass

In the previous chapter, you learned about precompilers, including why to use them, which ones are the known preprocessors, and their features. This chapter covers one of the most popular preprocessors: Sass.

In this chapter, you explore the following aspects of Sass:

  • Installation
  • Running the code
  • Variables
  • Comments
  • Data types
  • Parentheses
  • Nested rules
  • Nested properties
  • Referencing parent selector
  • Interpolation
  • Placeholder selector
  • Logical and control directives

Installing Sass

You install Sass via a Ruby gem, so you need to have Ruby installed on your machine. If you are on Mac OS X, you already have Ruby installed. If you are ...

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