You are here

function _less_demo_reverse in Less CSS Preprocessor 7.4

Same name and namespace in other branches
  1. 8 less_demo/less_demo.less.inc \_less_demo_reverse()
  2. 7.3 less_demo/less_demo.module \_less_demo_reverse()

LESS function that takes a series of arguments and reverses their order.

2 string references to '_less_demo_reverse'
LessUnitTest::test_less_output_path in tests/less.test
Test the _less_output_path() function.
less_demo_less_functions in less_demo/less_demo.less.inc
Implements hook_less_functions().

File

less_demo/less_demo.less.inc, line 78
Contains implementations of Less module hooks.

Code

function _less_demo_reverse($arg) {
  list($type, $delimiter, $value) = $arg;
  if ($type === 'list') {
    $arg = array(
      $type,
      $delimiter,
      array_reverse($value),
    );
  }
  return $arg;
}