几天前用 Sass 安装了 Foundation 5。但是,之后:
- 建立新的 test_grid
- cd test_grid
- 指南针 watch
watch创建的文件、目录...
打开 index.html 并没有样式。 (我也尝试了'compass compile'和'compass watch',但没有任何变化。
compass使用的config.rb显示:
add_import_path "bower_components/foundation/scss"
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "stylesheets"
sass_dir = "scss"
images_dir = "images"
javascripts_dir = "js"
app.scss 显示:
@import "settings";
@import "foundation";
查看 stylesheets/app.css 似乎没有导入 foundation.css 文件。
有什么想法吗?可能是一个完全新手的问题...把我的头撞到墙上并在谷歌上搜索广告令人作呕。
根据建议,我重新安装了指南针,但还是一样。 看的时候指南针好像没问题:
emily@emily:~/sites/test_grids(master*)$ compass watch
>>> Compass is watching for changes. Press Ctrl-C to Stop.
directory stylesheets
write stylesheets/app.css
当我修改 bower_components/foundation/scss/foundation.scss(插入 p {font-size: 10rem;} 它显示:
modified bower_components/foundation/scss/foundation.scss
write stylesheets/app.css
刷新后的 index.html 字体大小发生变化,但同样没有 foundation.css 样式。
最佳答案
我也遇到了这个问题,在这里找到了答案:
https://stackoverflow.com/a/25560150/3990944
最新的 Sass 和 Compass 不兼容。尝试卸载并安装旧版本。为我工作。详情在上面的帖子中。
关于css - 使用指南针 - 不应用 foundation.css 的 css 样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25551098/