我之前从未使用过Compass,虽然我已经使用了Sass一段时间了。我收到以下错误:
错误sass / screen.scss(第9行:未找到导入的文件或 不可读:sass / _globals.scss。
_footer.scss文件与_globals.scss文件位于同一目录中,但是当我在其中进行更改时,它正在被修改。我做错了什么?
我的screen.scss文件。
/* Welcome to Compass.
* In this file you should write your main styles. (or centralize your imports)
* Import this file using the following HTML or equivalent:
* <link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css" /> */
@import "compass/reset";
@import "compass/css3";
@import "compass/layout";
@import "sass/_globals.scss";
@import "sass/_footer.scss";
这是我的配置结构:
require 'compass/import-once/activate'
# Require any additional compass plugins here.
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "css"
sass_dir = "sass"
images_dir = "img"
javascripts_dir = "js"
# You can select your preferred output style here (can be overridden via the command line):
# output_style = :expanded or :nested or :compact or :compressed
# To enable relative paths to assets via compass helper functions. Uncomment:
# relative_assets = true
# To disable debugging comments that display the original location of your selectors. Uncomment:
# line_comments = false
# If you prefer the indented syntax, you might want to regenerate this
# project again passing --syntax sass, or you can uncomment this:
# preferred_syntax = :sass
# and then run:
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
答案 0 :(得分:0)
我猜你需要改变:
@import "sass/_globals.scss";
@import "sass/_footer.scss";
为:
@import "_globals.scss";
@import "_footer.scss";
您的sass配置文件已经指向sass子目录,因此除非您的文件位于sass / sass子目录中,否则可能是问题所在。