I know this is old, but I decided that I would answer with what I did if it helps someone else. I had a similar need for my application, and after I did not find many results and launched IE with the maximum number of selection errors when using them in one css file controlled by user selectors, I ended the way so that each theme was different CSS by creating a folder structure that looks like this:
:
- /app/assets/stylesheets/
- /// //
- /// /-1/
- /// /-2/
- .
app/assets/styleshseets application.css.scss( css, sass)
, ,
*= require_self
css , ( main/stylesheets). , , , , - , css, - , IE .
css
/// //
css, . , CSS , . ...
*= require_self
*= require_tree ./all
, :
/// /-1/
:
*= require_self
*= require_tree ./theme-1
, ( 2 1 ).
,
production.rb
config.assets.precompile += %w( application-all.css application-theme-1.css application-theme-2.css, etc.)
, , , . ( , ):
class MyController < ApplicationController
layout :serve_layout
...
def serve_layout
end
, - .