我是 Asset Pipeline 的新手,所以如果我做错了,请告诉我。
使用带有 SASS 的 Rails 3.2。我有一个配置部分,它定义了一堆我想在我的 scss 文件中使用的 SASS 变量。根据本指南,我先导入configuration
,然后bonus
。但是,我一直在 bonus.css.scss 中得到Sass::SyntaxError
说法。Undefined variable: "$darkRed"
我究竟做错了什么?
应用程序.css.scss
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*/
@import "configuration";
@import "bootstrap";
@import "bonus";
_configuration.css.scss
//colors
$darkRed: #B94A48;
$controlColor: #777;
奖金.css.scss
div.give-inline-help .help-inline
{
color: $darkRed;
font-size: 15px;
font-family: MuseoSans-300;
padding-left: 0px;
}