Sass Relational Operators
You are Here:
What is Relational Operators?
Relational operators returns a Boolean value indicates whether numbers are greater than, Less than, greater than or equal to, or less than or equal to one another.
Example
SASS TO CSS CONVERTER
//Check your console
@debug 1px > 1in; // false
@debug 20px < 24px; // true
@debug 9ms >= 55ms; // false
@debug 999ms <= 1s; // true
Sass Relational Operators
The following table provides a list of relational operators available in Sass.
Operator | Explanation | Operation | Result |
---|---|---|---|
> | Greater than | 1px > 1in | false |
< | Less than | 20px < 24px | true |
>= | Greater than or equal to | 9ms >= 55ms | false |
<= | Less than or equal to | 999ms <= 1s | true |
Relational Operators using Incompatible Units
Numbers with incompatible units can’t be compared.
Example
SASS TO CSS CONVERTER
//Check your console
@debug 1px > 1s; // Error
Reminder
Hi Developers, we almost covered 99.1% of Sass Tutorials with examples for quick and easy learning.
We are working to cover every Single Concept in Sass.
Please do google search for:
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.