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
Value | Type | Explanation |
---|---|---|
$name | Required | Specifies the name of the function. |
$css | Optional | Specifies whether the function should return a plain CSS function or not. Default value is false. |
Return Value
Value | Explanation |
---|---|
function | Returns 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.