2015-06-11 45 views
-1

我正在使用MVC应用程序的引导程序3的sass发行版。Bootstrap 3 + SASS

使用Google Chrome查看样式时 - 检查器引用的文件较少。在html页面中引用的唯一文件是bootstrap.css(我没有包含任何少的文件)。

但是,例如,在按钮上查看字体大小。它是引用buttons.less,如果你在Chrome浏览器中访问源代码,你可以导航css/less,并看到所有较少的文件(这些文件不存在于文件系统上)

为什么Chrome引用较少的文件不是SCSS文件)? 映射文件由visual studio 2013更新4重新生成。

如果我使用FireFox(打击相同的mvc/html页面),它将适当地显示对scss文件的引用。

所以有地图文件的问题(我想没有任何原因FireFox能够正常读取)为什么Chrome浏览器引用较少的文件?

THX

+1

我指的是http://sass-lang.com/以及我为什么在Chrome中遇到问题。即为什么Chrome会引用较少的文件(而不是SCSS文件)? – David

回答

1

你bootstrap.css文件可能包含以下编译内联源地图。

参见:http://lesscss.org/usage/#command-line-usage-options

lessc --source-map-map-inline 

This option specifies that the map file should be inline in the output CSS. This is not recommended for production, but for development it allows the compiler to produce a single output file which in browsers that support it, use the compiled css but show you the non-compiled less source. 

的第二源地图评论可能指向与萨斯产生源的地图。在相同文件中引用两个不同的源映射时,Chrome和FF会显示不同的结果。

我不知道为什么你应该必须在你的文件中的源地图。如果您在Sass代码中导入使用Less编译的CSS代码,可能会发生这种情况。