我剛剛安裝了Foundation 5和Sass,並且使用Compass觀看我的樣式表。我想知道添加自定義樣式的最佳做法是什麼。我已經創建了一個custom.scss文件,並使用@import「custom」引用它;在我的app.scss文件中。使用Mixins和Foundation 5
如果我想繼續改變身體的背景顏色,例如,我將如何使用mixin來做這件事。我加入:
$ body-bg:red;
我的custom.scss文件,但身體的背景沒有改變。我應該只編輯_settings.scss文件,這似乎是錯誤的...
任何想法我做錯了什麼?提前致謝!
這裏是我的config.rb:
# Require any additional compass plugins here.
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 = "javascripts"
# 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
這似乎也沒有工作。 – realph
你可以發佈你的config.rb嗎? –
我已將我的config.rb添加到上面的原始帖子中。 – realph