Sass get-function() Function

You are Here:

Sass get-function() Function

The get-function() function returns the function named $name. This can access both built-in and user-defined functions.

Note: By default, it throws an error if $name doesn't refer to either a built-in or user-defined function. However, if $css is true, it instead returns a plain CSS function.

Example

SASS TO CSS CONVERTER
@function foo($x) { @return $x; } $myFun: get-function(foo); p{ color: $myFun(#8c8c8c) }

Syntax

get-function($name, $css)

Parameter Value

ValueTypeExplanation
$nameRequiredSpecifies the name of the function.
$cssOptionalSpecifies whether the function should return a plain CSS function or not. Default value is false.

Return Value

ValueExplanation
functionReturns the function to a calling variable.

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.

Share this Page

Meet the Author