Определите имя переменной с переменной в операции LESS
Может кто-нибудь объяснить, почему этот код не работает:
@red-1:#ff0000;
@red-2:#990000;
@blue-1:#000ff;
@blue-2:#00099;
.setTheme(@theme){
@color-1:~"@{@{theme}-1}";
@color-2:fade(~"@{@{theme}-2}", 10%); //doesn't work
body.@{theme} .button{
background:@color-1;
color:@color-2;
}
}
.setTheme(~"red");
Спасибо;