Test nested LESS variables in minin calls

This commit is contained in:
Eric Lippmann 2022-06-29 11:39:39 +02:00 committed by Johannes Meyer
parent 1ec6913a04
commit e45c53ac3c
1 changed files with 34 additions and 0 deletions

View File

@ -90,6 +90,40 @@ LESS
);
}
public function testNestedVariablesInMixinCalls()
{
$this->assertEquals(
<<<CSS
.button1 {
background-color: var(--my-color, var(--black, #000000));
}
.button2 {
background-color: var(--my-black-color, var(--my-color, var(--black, #000000)));
}
CSS
,
$this->compileLess(<<<LESS
@black: black;
@my-color: @black;
@my-black-color: @my-color;
.button(@bg-color: @my-color) {
background-color: @bg-color;
}
.button1 {
.button();
}
.button2 {
.button(@my-black-color)
}
LESS
)
);
}
public function testDefiningVariablesWithLessCallables()
{
$this->assertEquals(