少有严格的进口 [英] LESS strictImports

查看:128
本文介绍了少有严格的进口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个可以编译少量文件的构建(所有文件实际上都被导入到一个master.less文件中)。构建的一个选项是 strictImports ,这表明它强制进行导入评估。有谁知道这是否与导入文件中的操作有关,还是我完全忽略了这一点?

I have a build that compiles several less files (all are actually imported into one master.less file). One of the options for the build is strictImports which suggests that it forces the evaluation of imports. Does anyone know if this have to do with operations in imported files, or am I completely missing the point?

推荐答案

strictImports 控制编译器是否允许中的 @import @media 阻止或(稍后添加)其他选择器块。请参阅这个已结束的问题中的一些评论。

The strictImports controls whether the compiler will allow an @import inside of either @media blocks or (a later addition) other selector blocks. See some of the comments from this closed issue with regards to that.

因此设置为 true 这些 允许:

So with it set to true these are not allowed:

@media screen {
   @import somefile.less;
}
.mySelector {
   @import somefile.less;
}

这篇关于少有严格的进口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆