0
当这里是我的LessTransform I类用于分析.less
文件转换为.css
文件:无点失败默默解析引导2.3.1 CSS
public class LessTransform : IBundleTransform
{
public void Process(BundleContext context, BundleResponse response)
{
response.Content = dotless.Core.Less.Parse(response.Content);
response.ContentType = "text/css";
}
}
我想用我的LessTransform
类分析下载bootstrap.css
文件。当该方法正在运行时,最初response.Content
具有Bootstrap的内容。
拨打dotless.Core.Less.Parse()
后,response.Content
为空。解析器无声无息地失败。
为什么?
我在哪里可以找到老版本的Bootstrap?他们在Github repo中的'tags'下载源文件,我不想自己编译这个东西。宁愿只下载一个文件。 – sergserg 2013-05-13 00:22:32
我**删除了官方下载的bootstrap.css文件中的所有'\ 9'实例,并且Dotless现在正确地解析了东西。 任何人都知道'\ 9'究竟是什么,如果它不打算在那里?无论哪种方式,删除'\ 9'解决了这个问题。 – sergserg 2013-05-13 00:57:22
\ 9对于IE来说显然是一种黑客攻击,所以如果你删除它,你会降低与某些版本IE的兼容性。以下是我发现的几个参考文献: http://webdood.com/?p=57 http://webdesignerwall.com/tutorials/css-specific-for-internet-explorer – SteveDonie 2013-09-06 15:34:48