O'Reilly logo

Sass and Compass Designer's Cookbook by Bass Jobsen

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

Applying operations in Sass

You can use SassScript to assign a value to a property or variable. SassScript enables you to apply standard arithmetic operations (adding, subtracting, multiplying, dividing, and modulo) when assigning values. Other operations are available per data type. In this recipe, you will learn how to use operations in SassScript to assign values.

Getting ready

For this recipe, you will use the command-line Sass compiler. Read the Installing Sass for command line usage recipe of Chapter 1, Getting Started with Sass, to find out how to install it. Operations with SassScript can easily be tested in the interactive mode of Ruby Sass. In the Using Sass interactive mode and SassScript recipe of Chapter 1, Getting Started with Sass ...

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