Ok I would love to work out how to use the new Raisl 3.1 Asset
Pipeline with SCSS variables, mixins etc and being able to use the
asset_path tag.
What I have so far is this. Im my application.css.scss I have the
following.
*= require_self
*= require layout
*= require home
This works fine with using the asset_path helper and variable within
layout ie,
// layout.css.scss.erb
$main-color: #cccccc;
.somediv{
background: url(''<%=asset_path
"small-avatar.gif"%>'') no-repeat;
color: $main-color;
}
But now in home lets say I want to use the variable from my layout.
// home.css.scss.erb
.another-div{
color: $main-color;
}
I get error.
Sass:SyntaxError: Undefined variable. "$main-color"
I cant use the @import method as I will then not be able to use .erb
for the asset_path helper.
Has anyone managed to get both working together ??
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.