简体   繁体   中英

Problems with SASS @import in Rails 3.1

I have some trouble with SASS imports in rails 3.1. I've tried both the branch '3-1-stable' and the tag 'v3.1.0.rc4'.

My Error

Undefined variable: "$var1".
  (in app/assets/stylesheets/application.css.scss)

app/assets/stylesheets/application.css.scss

@import "imp"; // defines $var1

body {
  border-right:5px solid $var1;
}

app/assets/stylesheets/_imp.scss

$var1: "blue";

你能尝试将_imp.scss重命名为_imp.css.scss吗?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM