Sass Introspection function
Sass Introspection
functions are rarely used to build stylesheets and are generally used for code debugging.
The following table lists the Sass’s Introspection
function:
Function |
Description & example |
---|---|
|
The dynamic call of the function, that is, the function parameter of the calling function is arguments and the result is returned. |
|
Check to see if the current blend passes the @ content block. |
|
Check whether the current Sass implementation supports this feature. Example: feature-exists (“at-error”); result: true |
|
Detect whether the specified function exists Example: function-exists (“nonsense”) result: false |
|
Returns the specified function. If css is true, a pure CSS function is returned. |
|
Detects whether a global variable is defined. Example: variable-exists (a) result: true |
|
Returns a representation of a string, where value is an sass expression. |
|
Detects the existence of the specified mixinname. Example: mixin-exists (“important-text”) result: true |
|
Returns the value type. The returned values can be number, string, color, list, map, bool, null, function, arglist. Example: type-of (15px) result: number type-of (# ff0000) result: color |
|
Returns the unit (or compound unit) of the incoming number. Example: unit (15px) result: px |
|
Returns a Boolean value to determine whether the incoming number has a unit. Example: unitless (15px) result: false unitless (15) result: true |
|
Determine whether the variable is in the current scope. Example: variable-exists (b) result: true |