if

if($condition, $if-true, $if-false)

Returns one of two values, depending on whether or not $condition is true. Just like in @if, all values other than false and null are considered to be true.

Examples:

if(true, 1px, 2px) => 1px
if(false, 1px, 2px) => 2px

Parameters:

  • $condition (Base) Whether the $if-true or $if-false will be returned
  • $if-true (Tree::Node)
  • $if-false (Tree::Node)

Returns:

  • (Base) $if-true or $if-false
doc_Sass
2016-11-11 13:09:10
Comments
Leave a Comment

Please login to continue.