SASS Global Variables + Rails 3.1

Viewed 4432

I am using Rails 3.1RC4 with default SASS setup. I have the following files

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 . 
*/

_variables.css.scss

$var1 : somevalue;
...

site_layout.css.scss

@import "variables";
... Some Sass Code

But I can't access the variables defined in _variables.css.scss in site_layout. What am I doing wrong? Rails is apparently finding the variables file since it doesn't throw a "file not found" error, which it does if I change the import filename. Still the vars are not carried over.

Any ideas?

Thanks!

2 Answers
Related