LESS strictImports

那年仲夏 提交于 2019-12-21 21:39:47

问题


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?


回答1:


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.

So with it set to true these are not allowed:

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


来源:https://stackoverflow.com/questions/14763392/less-strictimports

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!