title: Is there any tool which can rearrange the css based on same type selector?
body: <p>I've big css where selector for same things are on different place.</p>
  
  <p>Is there any tool which can rearrange the css based on same type selector?</p>
  
  <p><strong>This is just example.</strong></p>
  
  <pre><code>#main h2 {
      font-size: 2em;
  }
  #sidebar h3 {
      font-size: 2em;
  }
  
  #main h1 {
      font-size: 3em;
  }
  
  #sidebar h4 {
      font-size: 1.6em;
  }
  
  
  #main #box h2 {
      font-size: 2em;
  }
  
  #sidebar ul li {
      font-size: 1em;
  }
  </code></pre>
  
  <p><strong>it should arranged like this</strong></p>
  
  <pre><code>#main h1 {
      font-size: 3em;
  }
  
  #main h2 {
      font-size: 2em;
  }
  
  #main #box h2 {
      font-size: 2em;
  }
  
  #sidebar h3 {
      font-size: 2em;
  }
  
  #sidebar h4 {
      font-size: 1.6em;
  }
  
  #sidebar ul li {
      font-size: 1em;
  }
  </code></pre>
  
  <p>if parent selector is same then all should be at same place.</p>