css - 使用 bootstrap-sass 时,Compass 是否应该生成 bootstrap.css 的两个副本?

标签 css ruby twitter-bootstrap compass-sass bootstrap-sass

我正在尝试使用 sinatra 设置一个 ruby​​ web 元素(1.4.5), slim (2.0.3), sass (3.4.0) 和 bootstrap-sass (3.2.0.1) gem 。

由于我使用的是 Sass,所以我决定试用 compass (1.0.1) gem 从我的 .scss 文件自动生成 .css

我遵循了 bootstrap-sass github page 上的指示与 compass 一起使用,即:

compass create my-new-project -r bootstrap-sass --using bootstrap

However, I noticed that this always generates 2 copies of bootstrap.css (which git diff tells me are the same except for file paths since they are in different directories):

... (other files/directories get made and written)
directory my-new-project/stylesheets/bootstrap
    write my-new-project/stylesheets/bootstrap/bootstrap.css
directory my-new-project/stylesheets/bootstrap/bootstrap
    write my-new-project/stylesheets/bootstrap/bootstrap/bootstrap.css

这是此安装的预期行为吗?如果是这样,为什么需要 2 个 bootstrap.css 副本?如果没有,我怎样才能让 compass 停止生成 2 个副本?

最佳答案

显然这是在 Unnecessary file in assets 中进行的 git issuepull request .在 bootstrap-sass gem 的下一个版本中,它应该不再是一个问题,正如 glebm 在拉取请求中提到的那样。

如上文提到的拉取请求中所述,解决此问题的一个简单方法是删除 bootstrap-sass gem 中的 assets/stylesheets/bootstrap/bootstrap.scss .

关于css - 使用 bootstrap-sass 时,Compass 是否应该生成 bootstrap.css 的两个副本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25467513/

相关文章:

javascript - Bootstrap 模态不显示

jquery - 在 Twitter Bootstrap 中实现下拉菜单背后的想法是什么?

html - Bootstrap div 不正确堆叠

css - 嵌套 <article> 和 <h1> 标签?

CSS 网格 : Auto-fit behaving like Auto-fill when using grid-column-start/end

python - 寻找有关如何将 PDF 转换为结构化格式的建议

ruby - 描述ruby中的类关系

css 覆盖宽度

javascript - Gallerific SlideShow 缩略图垂直外观

ruby-on-rails - 如何将 current_user 传递给 Sidekiq 的 Worker