Function Registration
Because Sass 3.5+ requires first-class functions, we provide tools for capturing functions and making them available to the Accoutrement map parser. This also provides the ability to alias functions as you like.
$functions (map)
scss
$functions: () !default;
We provide a single map to store & manage functions that you would like to use inside Accoutrement maps.
$functions: (
'inspect': meta.get-function('inspect', $module: 'meta'),
);
Functions can be registered multiple times, under any aliases, but function maps are not able to use the alias syntax.
Since 4.0.0
:
- BREAKING: No longer accepts alias references or any other aspects of the token syntax
Since 0.1.0
:
- NEW: Supports the Accoutrement map-reference syntax, for creating function aliases
Map Properties
<alias>: (function)
Each alias key in the map should refer to a captured function
@mixin register()
Register functions with Accoutrement.
Parameters & Output
$function: (function)
The first-class function to be registered
$names...: $function (strings)
One or more alias names (strings) to use for map-access to the function
{CSS output} (code block)
{map} $_ACCOUTREMENT_APP - Functions are registered in a map under any number of aliases