Sass function-exists() Function

Last Updated:

Sass function-exists() Function

The function-exists() function returns whether a function named $name is defined, either as a built-in function or a user-defined function.

Example

SASS TO CSS CONVERTER
//Check your console @debug function-exists("ceil"); // true @debug function-exists("add"); // false @function add($num1, $num2) { @return $num1 + $num2; } @debug function-exists("add"); // true

Syntax

function-exists($name)

Parameter Value

ValueTypeExplanation
$name Required Specifies the function name.

Return Value

ValueExplanation
bool Returns whether a function named $name is defined, either as a built-in function or a user-defined function.

Share this Page

Meet the Author