这是我main.less
在我的流星应用程序中的文件,我已经添加了bootstrap
包。
@import "variables.less";
@import "mixins.less";
#searchbar {
.border-radius(10px);
.box-shadow();
}
但是打开应用程序http://localhost:3000/
,我得到这个错误:
Your app is crashing. Here's the latest log.
Errors prevented startup:
/Users/anup/code/projects/learning/main.less: Less compiler error: .border-radius is undefined
/Users/anup/code/projects/learning/main.less: Less compiler error: .border-radius is undefined
Your application is crashing. Waiting for file change.
而.span4
,.dropdown
和所有其他引导类在我的源代码中工作得很好main.html
(它也在基本目录中,以及main.less
)
如何在 中使用 bootstrap mixins main.less
?
更新:令人惊讶的是,如果我把它放进去main.less
@import "variables.less";
@import "mixins.less";
#searchbar {
}
然后错误变为
Your app is crashing. Here's the latest log.
Errors prevented startup:
/Users/anup/code/projects/learning/main.less: Less compiler error: 'variables.less' wasn't found.
/Users/anup/code/projects/learning/main.less: Less compiler error: 'variables.less' wasn't found.
Your application is crashing. Waiting for file change.