0
我想創建一個混合,它將通過合併其參數來返回名稱空間變量的值。LESS合併變量名稱並獲取值
瞧:
@namespace_thing: "some value";
@namespace_otherthing: "some other value";
@othernamespace_thing: "another value";
@othernamespace_otherthing: "again other value";
的混入:
.monster(@namespace,@var){
@tmp: ~"@{namespace}"+"_"[email protected]{var};
content: @tmp // That's what I just dont know.
}
#TESTSELECTOR{
.monster(namespace,thing); // would return
content: "some value";
}
Thanks @ seven-phases-max!這就是我一直在尋找的:) –