Sass Boolean Operators

Last Updated:

What is Boolean Operators?

Boolean operators return a boolean value (true or fasle).

A Boolean expression may be composed of a combination of the Boolean constants true or false, Boolean-typed variables, Boolean-valued operators, and Boolean-valued functions.


//Check your console @debug not false; // true @debug true and false; // false @debug true or false; // true

Sass Boolean Operators

The following table provides a list of boolean operators available in Sass.

not Returns the opposite of the expression's value.
It turns true into false and false into true.
not false true
and Returns true if both expressions' values are true, and false if either is false. true and false false
or Returns true if either expression’s value is true, and false if both are false. true or false true

Share this Page

Meet the Author