【发布时间】:2013-10-27 03:08:37
【问题描述】:
我最近开始在我的节点项目中使用引导 SCSS。比如我有app/bower_components/bootstrap-sass/lib/_glyphicons.scss。
查看我的 CSS 输出,我看到如下内容:
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/some\/path\/project\/app\/bower_components\/bootstrap-sass\/lib\/_normalize\.scss}line{font-family:\0000332}}
audio,
canvas,
video {
display: inline-block;
}
我有两个问题:
- 这似乎是一个安全漏洞。每个人都可以通过查看我的 CSS 来推断我的操作系统和目录结构。关闭此安全漏洞的正确方法是什么?
- 它是如何工作的?我几乎明白了,但我错过了一些东西。查看 SCSS,我看到 bootstrap 正在使用
$icon-font-path,它显然变成了这个绝对路径。查看compass documentation,我看到它们提供绝对值但没有$icon-font-path
这是我指的一段代码:
@font-face {
font-family: 'Glyphicons Halflings';
src: url('#{$icon-font-path}#{$icon-font-name}.eot');
src: url('#{$icon-font-path}#{$icon-font-name}.eot?#iefix') format('embedded-opentype'),
url('#{$icon-font-path}#{$icon-font-name}.woff') format('woff'),
url('#{$icon-font-path}#{$icon-font-name}.ttf') format('truetype'),
url('#{$icon-font-path}#{$icon-font-name}.svg#glyphicons-halflingsregular') format('svg');
}
【问题讨论】:
标签: compass-sass bootstrap-sass