From the course: Sass Essential Training

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Operators and conditionals

Operators and conditionals - Sass Tutorial

From the course: Sass Essential Training

Operators and conditionals

- [Instructor] Every programing language has a series of operators and math functions to help you take care of places where you need to do calculations. Now, in addition Sass has some special operators that can also help you compare and make decisions within your code. Let's take a look at both of those. Now, Sass has the traditional operators that you expect from math. So, things like the addition, subtraction, division, equals as well as the modules operator, what gives you the remainder of a division. Now, the slash is a little bit strange in Sass. Sometimes it refers to a list and sometimes it refers to a division. And it does pretty good job of figuring out when you want to do either. However, in the future, the slash operator will be replaced by math.div. Which makes it a little bit inconvenient, because instead of just using the slash to divide things, you'll have to use math.div, and then put a couple of…

Contents