mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
Support variable variables
This commit is contained in:
parent
853fa93ea5
commit
517b0353bc
@ -36,6 +36,14 @@ class ColorPropOrVariable extends Less_Tree
|
||||
public function compile($env)
|
||||
{
|
||||
$v = $this->getVariable();
|
||||
|
||||
if ($v->name[1] === '@') {
|
||||
// Evaluate variable variable as in Less_Tree_Variable:28
|
||||
$vv = new Less_Tree_Variable(substr($v->name, 1), $v->index + 1, $v->currentFileInfo);
|
||||
// Overwrite the name so that the variable variable is not evaluated again
|
||||
$v->name = '@' . $vv->compile($env)->value;
|
||||
}
|
||||
|
||||
$compiled = $v->compile($env);
|
||||
|
||||
if ($compiled instanceof ColorProp) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user