SASS Global Variables + Rails 3.1

Den*_*nny 11 haml ruby-on-rails sass

我正在使用Rails 3.1RC4和默认的SASS设置.我有以下文件

application.css.scss

/*
 * This is a manifest file that'll automatically include all the stylesheets available in this directory
 * and any sub-directories. 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.
 *= require_self
 *= require_tree . 
*/
Run Code Online (Sandbox Code Playgroud)

_variables.css.scss

$var1 : somevalue;
...
Run Code Online (Sandbox Code Playgroud)

site_layout.css.scss

@import "variables";
... Some Sass Code
Run Code Online (Sandbox Code Playgroud)

但我无法访问site_layout中_variables.css.scss中定义的变量.我究竟做错了什么?Rails显然找到了变量文件,因为它不会抛出"找不到文件"错误,如果我更改导入文件名就会出错.这些变量还没有结转.

有任何想法吗?

谢谢!

Den*_*nny 3

该问题似乎已通过最新版本的导轨和链轮得到解决。在你的 gem 文件中:

gem 'rails', :git => "git://github.com/rails/rails.git", :branch => "3-1-stable"
Run Code Online (Sandbox Code Playgroud)