我試圖從colorzilla's handy gradient editor獲得scss漸變工作。並稱SCSS代碼資產/樣式表/ header.css.scss時,我得到一個錯誤:獲取指南針混合插件以使用Rails
Undefined mixin 'filter-gradient'. (in /Users/me/code/app/assets/stylesheets/header.css.scss)
所以我添加@import "compass/css3/images";
我header.css.scss文件:
@import "compass/css3/images";
header address {
background-color: #c9de96;
@include filter-gradient(#c9de96, #398235, vertical);
$experimental-support-for-svg: true;
@include background-image(linear-gradient(top, #c9de96 0%,#8ab66b 44%,#398235 100%));
}
現在我得到這個錯誤:
File to import not found or unreadable: compass/css3/images. Load path: Sass::Rails::Importer(/Users/me/code/app/assets/stylesheets/header.css.scss) (in /Users/me/code/app/assets/stylesheets/header.css.scss)
我不得不羅盤軌道添加到我的Gemfile:
group :assets do
gem 'sass-rails'
gem 'coffee-rails'
gem 'compass-rails'
gem 'uglifier'
end
如何獲得這些線性漸變使用scss和rails?
準確地說我的問題。感謝您跟進您自己的答案。 – rememberlenny