Css 引导程序3+;无礼

Css 引导程序3+;无礼,css,twitter-bootstrap-3,sass,less,google-chrome-devtools,Css,Twitter Bootstrap 3,Sass,Less,Google Chrome Devtools,我正在将Bootstrap3的sass版本与MVC应用程序一起使用 当使用Google Chrome查看样式时,inspector引用的文件较少。html页面中唯一引用的文件是bootstrap.css(我没有包含任何更少的文件) 但是,例如查看按钮上的字体大小。它引用的是buttons.less,如果你访问Chrome中的源代码,你可以浏览css/less并查看所有less文件(这些文件在文件系统中不存在) 为什么Chrome引用较少的文件(而不是SCSS文件)? 地图文件由visual st

我正在将Bootstrap3的sass版本与MVC应用程序一起使用

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

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

为什么Chrome引用较少的文件(而不是SCSS文件)? 地图文件由visual studio 2013 update 4重新生成

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

那么,地图文件是否存在问题(我认为没有理由FireFox能够读取ok),为什么Chrome引用的文件较少


thx

您的bootstrap.css文件可能包含一个用更少的代码编译的内联源代码映射

见:

第二个源映射注释可能指向使用Sass生成的源映射。在同一文件中引用两个不同的源地图时,Chrome和FF显示不同的结果

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

我指的是Chrome中出现问题的方式/原因。i、 e.为什么Chrome引用较少的文件(而不是SCSS文件)?
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.