Css 编译引导compass文件时如何更改路径
我已将引导sass添加到我的项目中,并将其导入到application.scss文件中,如下所示 @ 在引导compass文件中,有一些函数Css 编译引导compass文件时如何更改路径,css,gruntjs,compass-sass,angular-ui-bootstrap,grunt-contrib-compass,Css,Gruntjs,Compass Sass,Angular Ui Bootstrap,Grunt Contrib Compass,我已将引导sass添加到我的项目中,并将其导入到application.scss文件中,如下所示 @ 在引导compass文件中,有一些函数 @function twbs-font-path($path) { @return font-url($path, true); } @function twbs-image-path($path) { @return image-url($path, true); } 将用于设置图像和字体的路径 使用compass构建css文件后,css文件
@function twbs-font-path($path) {
@return font-url($path, true);
}
@function twbs-image-path($path) {
@return image-url($path, true);
}
将用于设置图像和字体的路径
使用compass构建css文件后,css文件的输出包含以下字体文件路径
@font-face {
font-family: 'Glyphicons Halflings';
src: url(/.tmp/styles/fonts/bootstrap/glyphicons-halflings-regular.eot);
src: url(/.tmp/styles/fonts/bootstrap/glyphicons-halflings-regular.eot?#iefix) format("embedded-opentype"), url(/.tmp/styles/fonts/bootstrap/glyphicons-halflings-regular.woff) format("woff"), url(/.tmp/styles/fonts/bootstrap/glyphicons-halflings-regular.ttf) format("truetype"), url(/.tmp/styles/fonts/bootstrap/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format("svg");
}
如何更改它以使源路径变为:
src: url(./fonts/bootstrap/glyphicons-halflings-regular.eot)
而不是src:url(/.tmp/styles/font/bootstrap/glyphons-halflings-regular.eot)
请注意application.scss是由grunt contrib compass构建的
谢谢。您应该能够更改指南针配置,并将字体目录设置为“字体”,而不是(看起来)“.tmp/styles/fonts”。您好,导入文件时在哪里可以指定@font目录?我不想直接在bower组件内部更改它。谢谢
src: url(./fonts/bootstrap/glyphicons-halflings-regular.eot)