Sass @return Rules

Last Updated:

Sass @return Rules

@return indicates the value to use as the result of calling a function.

Note: Sass has the following rules to follow.

  • Each @function must end with a @return.
  • @return is only allowed within a @function body.

Example

SASS TO CSS CONVERTER
@function myFunction($x){ $result: $x * 2; @return $result; } footer ul{ font-size: myFunction(8) * 1px; }

Syntax

@return returnValue;

Share this Page

Meet the Author