【发布时间】:2014-01-15 21:40:05
【问题描述】:
我想创建一个 mixin,通过合并参数来返回命名空间变量的值。
查看:
@namespace_thing: "some value";
@namespace_otherthing: "some other value";
@othernamespace_thing: "another value";
@othernamespace_otherthing: "again other value";
混合:
.monster(@namespace,@var){
@tmp: ~"@{namespace}"+"_"+@{var};
content: @tmp // That's what I just dont know.
}
#TESTSELECTOR{
.monster(namespace,thing); // would return
content: "some value";
}
【问题讨论】:
标签: variables merge namespaces less mixins