title: How to manage CSS Stylesheet Assets in Rails 3.1?
body: <p>I'm just learning the new asset pipeline in Rails 3.1. One particular problem I'm having is with the way Sprockets just mashes all the found CSS stylesheets into one massive stylesheet. I understand why this is advantageous over manually merging stylesheets and minifying for production. But I want to be able to selectively cascade stylesheets instead of having all rules all mashed together. For instance, I want:</p>
  
  <p>master.css</p>
  
  <p>to be loaded by all pages in the Rails app, but I want</p>
  
  <p>admin.css only to be loaded by pages/views within the admin section/namespace.</p>
  
  <p>How can I take advantage of the great way that Rails 3.1 combines stylesheets and minifies them for production, but also have the former flexibility of being able to load only certain stylesheet combinations per layout?</p>
  
  <p>Or should this be done by adding a class to body tags in layouts-</p>
  
  <p>body class="admin"</p>
  
  <p>And then target style rules as appropriate. Using SASS scoped selectors this might be a reasonable solution.</p>