title: Can the SASS minifier remove duplicate styles?
body: <p>I know that the css rules are fairly complex; however, couldn't the following css be fairly simply reduced in a number of ways by the optimizer? And if so, is there an option for it in the rails-sass gem?</p>
  
  <pre class="lang-css prettyprint-override"><code>span {
      background: red;
      color: green;
  }
  
  .test2 {
      background: red;
      color: green;
  }
  
  span {
      background: green;
      color: inherit;
  }
  
  .test2 {
      background: inherit !important;
      color: inherit;
      color: inherit;
      color: inherit;
  }
  </code></pre>
  
  <p><strong>Additional Context:</strong></p>
  
  <p>To help clarify, I would propose the following as well...</p>
  
  <p>Source:</p>
  
  <pre class="lang-css prettyprint-override"><code>span {
      background: red;
  }
  span {
      background: orange;
      color: green;
  }
  span {
      background: yellow;
  }
  span {
      background: blue;
      color: green;
  }
  </code></pre>
  
  <p>And, I would want a compiler to generate the following:</p>
  
  <pre class="lang-css prettyprint-override"><code>span {
      background: blue;
      color: green;
  }
  </code></pre>
  
  <p>I know there are redundant styles, but this happens many times when continually revising stylesheets, and I want to eliminate the dead code.</p>