You are here

function hook_less_variables in Less CSS Preprocessor 7.4

Same name and namespace in other branches
  1. 8 less.api.php \hook_less_variables()
  2. 7.3 less.api.php \hook_less_variables()

Define LESS variables.

Should return flat associative array, where key is variable name.

Variables are lazy evaluated, so variables that depend on others do not have to appear in order.

Variables returned by this function are cached, therefore values returned by this function should not change. If you need variables to change from page to page, use hook_less_variables_alter().

Return value

array

See also

hook_less_variables_alter()

hook_less_variables_SYSTEM_NAME_alter()

1 function implements hook_less_variables()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

less_demo_less_variables in less_demo/less_demo.less.inc
Implements hook_less_variables().
2 invocations of hook_less_variables()
_less_registry in ./less.module
Keeps track of .less file "ownership".
_less_setting_form_element in includes/less.theme.inc

File

./less.api.php, line 30
Hooks provided by the Less module.

Code

function hook_less_variables() {
  return array(
    '@variable_name_1' => '#ccc',
    '@variable_name_2' => 'darken(@variable_name_1, 30%)',
  );
}