0

我目前正在使用 LESS 变量和~转义方法来定义某些媒体查询,如下所示:

@threeColumns:   ~"only screen and (min-width: 855px)";

但是,我最理想的做法是通过计算另一个 LESS 变量来定义最小宽度值。我知道您可以像这样在转义的 LESS 中使用变量:

@columnWidth: 265px;
@threeColumns:   ~"only screen and (min-width: @{columnWidth})";

但是你能在 LESS 的转义位中乘以这些变量吗?这项工作是这样的(无效的 LESS):

@columnWidth: 265px;
@threeColumns:   ~"only screen and (min-width: (@{columnWidth}*2) )";

非常感谢您的帮助。

4

0 回答 0