2011-09-26 30 views
3

我projects.css.scss文件看起來像波紋管一個,SCSS樣式表問題軌3.1

// Place all the styles related to the Projects controller here. 
// They will automatically be included in application.css. 
// You can use Sass (SCSS) here: http://sass-lang.com/ 

$right-container-background: #3BBFCE; 
$right-container-padding: 2px; 

.right-container{ 
    background-color: $right-container-background; 
    color: white; 
    padding-left: $right-container-padding; 
    padding-right: $right-container-padding; 
} 

它說,所有的樣式將被自動添加到您的application.css。

但我不能夠使用它,而不用導入到application.css 即

@charset "utf-8"; 
@import "projects.css.scss"; 
@import "partners.css.scss"; 

所以,雖然我在考慮項目部分是,它是不會加載所有。在application.css中導入的scss文件?

+0

你可以添加整個'application.css'嗎? –

+0

我已經提供了我的application.css在上面 –

回答

2

在軌3.1的默認application.css包含以下行:

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

你應該,如果你想要的一切,包括的默認行爲重新進行添加。

+0

謝謝...它完美地運行 –

+0

@KamrulHassan你能接受我的答案嗎?你也應該回到你的其他問題並接受解決方案。對於可能出現在此頁面上的其他人更清楚,並且它可以爲您提供聲譽;-) –