简体   繁体   English

引导程序 3 + SASS

[英]Bootstrap 3 + SASS

I am using the sass release of bootstrap 3 with an MVC application.我正在使用带有 MVC 应用程序的 bootstrap 3 的 sass 版本。

When reviewing the styles with Google Chrome - inspector is referencing the less files.使用 Google Chrome 查看样式时 - 检查员正在引用较少的文件。 The only files referenced in the html pages is the bootstrap.css (i have not included any less files). html 页面中唯一引用的文件是 bootstrap.css(我没有包含任何 less 文件)。

However for example looking at font-size on a button.但是,例如查看按钮上的字体大小。 It is referencing buttons.less and if you go to sources within Chrome you can navigate css/less and see all the less files (these files do not exist on the file system)它引用了buttons.less,如果你在Chrome中访问源,你可以导航css/less并查看所有less文件(这些文件在文件系统中不存在)

Why is Chrome referencing the less files (and not the SCSS files)?为什么 Chrome 引用较少的文件(而不是 SCSS 文件)? The map file was regenerated by visual studio 2013 update 4.地图文件由visual studio 2013 update 4重新生成。

If i use FireFox (hitting the same mvc/html pages) it shows the references to the scss file appropriately.如果我使用 FireFox(点击相同的 mvc/html 页面),它会适当地显示对 scss 文件的引用。

So is there an issue with the map file (i am thinking no cause FireFox is able to read ok) why is Chrome referencing the less files?那么地图文件是否存在问题(我认为没有原因 FireFox 能够正常读取)为什么 Chrome 引用较少的文件?

thx谢谢

Your bootstrap.css file possible contains an inline source map compiled with Less.您的 bootstrap.css 文件可能包含一个用 Less 编译的内联源映射。

See: http://lesscss.org/usage/#command-line-usage-options :请参阅: 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.

An second source map comment possible point to your source map generated with Sass.第二个源映射注释可能指向您用 Sass 生成的源映射。 The Chrome and FF show different results when referencing two different source maps in the same file.在同一文件中引用两个不同的源映射时,Chrome 和 FF 显示不同的结果。

I not sure why you should have to source maps in your file.我不知道为什么你应该在你的文件中使用源映射。 If you import the CSS code compiled with Less in your Sass code this can happen maybe.如果你在你的 Sass 代码中导入用 Less 编译的 CSS 代码,这可能会发生。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM