我有一个变量@index
,我想输出一个选择器,以便当@index
为3
时,选择器为[data-sth="3"]
。
更长的示例:
@index: 3;
/* selector here */ {
color: red;
}
期望的输出:
[data-sth="3"] {
color: red;
}
我尝试过几种方法,但都没有成功过。谢谢。
我有一个变量@index
,我想输出一个选择器,以便当@index
为3
时,选择器为[data-sth="3"]
。
更长的示例:
@index: 3;
/* selector here */ {
color: red;
}
期望的输出:
[data-sth="3"] {
color: red;
}