O'Reilly logo

Jump Start Sass by Miriam Suzanne, Hugo Giraudel

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 5Loops and Conditions

Our journey with Sass is going well so far, don’t you think? We now have a solid understanding of variables, and know about functions and mixins.

Mixins and functions usually involve logic to perform well. For instance: “do this in this condition, or do that,” or “iterate over this list to perform some action.” That’s why this chapter will be dedicated to Sass logic handlers: loops and conditions.

Conditional statements represent the simplest control structures, and more often that not, you’ll need them to use loops effectively. Therefore we’ll start with that right away, if you don’t mind (see what I did there?).

Conditions

Conditions are a pillar of any piece of software ever written. Even outside of the computer ...

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