title: Is there a way to combine and optimize selectors in SASS stylesheets?
body: <p>Is there any good practices or tools for merging similar selectors and optimizing SCSS source?</p>
  
  <p>For example having this:</p>
  
  <pre class="lang-css prettyprint-override"><code>#left .menu 
  {
       //Content a 
  }
  
  #left .menu span
  {
       //Content b 
  }
  
  #left .menu 
  {
       //Content c 
  }
  </code></pre>
  
  <p>Turn into this:</p>
  
  <pre><code>#left .menu 
  {
       //Content a
       //Content c 
  
       span
       {
            //Content b 
       }
  
  }
  </code></pre>
  
  <p>It's tedious to do this by hand, especially for larger stylesheets where the structure might not be so apparent. One could put more effort into writing leaner and cleaner SCSS, but it should be some tidy SCSS tool out there, or is there a best practice I'm missing?</p>