LESS @import 似乎不起作用
使用命令行程序 lessc
按照本指南在 Ubuntu 计算机上安装,似乎没有按照我的预期编译 @import
规则。
$ echo '@import "inc.less"' > test.less
$ echo 'body { background: pink }' > inc.less
$ lessc test.less
输出是一个空行。我期待的是 inc.less 的内容。我在这里做错了什么吗?
Using the command line program lessc
installed by following this guide on a Ubuntu machine, don't seem to compile @import
rules as I expected.
$ echo '@import "inc.less"' > test.less
$ echo 'body { background: pink }' > inc.less
$ lessc test.less
The output is an empty line. I expected the contents of inc.less. Am I doing something wrong here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试
@import "inc";
不要使用
.less
扩展名。我还认为你需要一个分号。例如,以下几行对我有用:
将 blueprint/screen.less 和 blueprint/ie.less 导入文件中。
Try
@import "inc";
Don't use the
.less
extension. I also think you need a semicolon.For example, here's a couple of lines that are working for me:
That imports blueprint/screen.less and blueprint/ie.less into the file.