English 中文(简体)
DotLess - How to import a LESS file in a parent rafter?
原标题:DotLess - How to import a LESS file in a parent folder?

我有这样的组合结构:

~/css/file1.less
~/css/folder/file2.less

我想做的是进口档案。 内部文件2.无,如我的档案2。 我没有这样的法律:

@import "../file1.less";

This do not work, and the compiler crash when I build the project. I execute the compiler in Visual Studio 2010.

我怎么能进口被置于双亲手里的更少档案?

最佳回答

这似乎在LESS中是一种ug。

bug报告的评论表明,它固定在主要部门,因此,如果你从 g获得最新版本的话,它或许会发挥作用。

。 和StackOverflow:。 如何减少幼儿发展?

问题回答

您必须先于<条码>。 例如:

@import "./../style.less";  /* Correct */
@import "../style.less";    /* Wrong */

我刚刚测试了进口一个文件,它就等于是你的工作方式。 汇编者在坠毁时有什么错误? 这一错误可能有助于你。

顺便提一下,你或许应该以不同的方式保存你的无端档案。

为此:

@import "~/root_css_folder/parentfolder/file1.less";




相关问题
Best practices for Subversion and Visual Studio projects

I ve recently started working on various C# projects in Visual Studio as part of a plan for a large scale system that will be used to replace our current system that s built from a cobbling-together ...

Enable PHP highlights in VS 2010?

I ve heard that Visual Studio 2010 Beta 2 has support for PHP. When I load a PHP file though, it has nothing highlighted and is nothing more than a glorified text editor. Is there a way to enable it?...

Do I want Publish or Release Build in VB.net?

I wrote a little (like 40 lines little) Winforms application with VB.net in Visual Studio 2010. Now I ve released the code as a Google Code project. It s easy for a developer to get the source but I d ...

Unit Testing .NET 3.5 projects using MStest in VS2010

There s a bug/feature in Visual Studio 2010 where you can t create a unit test project with the 2.0 CLR. https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=483891&wa=...

热门标签