Friday, December 16, 2011

[Rails] How are other people handling dynamically loaded less or sass files with rails 3.1?

Hi,

I'm converting an app to use the asset pipeline, and we have a lot of
views that are including stylesheets on an as-needed basis. We're
injecting the stylesheet_link_tag calls into the layout via
content_for/yield.

We're also transitioning to the less css framework, and I want to take
advantage of all the fun stuff like variable and mixins, etc. If we
continue doing things the way we're doing them now, then each as-
needed stylesheet will have to import the file containing all of the
variables and mixins.

Is there another approach that people are using to address this?
Since css files are precompiled in production mode, I don't think I
can put this logic into the css files (I was thinking that by making
them erb files I could include additional files in the main css file
using the controller and action names).

Thanks,
Kristina

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate