title: Compiling IE styles in a seperate stylesheet
body: <p>I'm looking at ways to compile all of my IE styles into a separate stylesheet to cut down on the file size of my main stylesheet. I would then pull in those IE styles using conditional comments.</p>
  
  <p>I currently use Paul Irish's idea of targeting IE by adding classes to <code>&lt;html&gt;</code> <a href="http://www.paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/" rel="nofollow">http://www.paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/</a> see below:</p>
  
  <pre><code>&lt;!--[if IE 8]&gt;         &lt;html class="ie-8"&gt; &lt;![endif]--&gt;
  &lt;!--[if gt IE 8]&gt;&lt;!--&gt; &lt;html&gt;         &lt;!--&lt;![endif]--&gt;
  </code></pre>
  
  <p>So I can use the following:</p>
  
  <pre><code>.ie-test {
      background: green;
  
      .ie-8 &amp; {
          background: red;
      }
  
  }
  </code></pre>
  
  <p>This technique works fine but all styles are in included in the same stylesheet. I'd like to pull out the IE only stylesheets and compile those to a dedicated stylesheet. There are techniques around such as Jake Archibald's technique: <a href="http://jakearchibald.github.io/sass-ie/" rel="nofollow">http://jakearchibald.github.io/sass-ie/</a> that work with media queries but ideally I'd like to do something such as the following.</p>
  
  <p>Assuming this is a partial with a file name of <code>_test.scss</code>:</p>
  
  <pre><code>.ie-test {
      @if $ie-only == true {
          background: red;
      }
  
      @else {
          background: green;
      }
  }
  </code></pre>
  
  <p>I would then have two .scss files that pull in the relevant styles, one for IE:</p>
  
  <pre><code>$ie-only == true;
  
  @import "test";
  </code></pre>
  
  <p>One for everything else:</p>
  
  <pre><code>@import "test";
  </code></pre>
  
  <p>My test's are very hit and miss so I was looking for some advice on the best way forward.</p>
  
  <p>What I'm aiming for may not be possible, but it would be good to hear some thoughts.</p>