title: Sorting a set of CSS selectors on the basis of specificity
body: <p>How can a set of CSS selectors be sorted on the basis of CSS specificity in a JS function?</p>
  
  <pre><code>function SortByCssSpecificity(input_array_of_css_selectors) {
    ...
    return sorted_array_of_css_selectors;
  }
  </code></pre>