title: Select every first unique element by grouping
body: <p>I have a list of elements which have alternating classes. The occurrences of the classes are random and can occur once or many times in a row. </p>
  
  <p>I am looking a way to select every first occurrence of an element (marked with a <code>-</code>). Preferably, I'd like to do this in CSS but I can work with a JavaScript solution as well. </p>
  
  <pre><code>&lt;div class="type-1"&gt;&lt;/div&gt;  -
  &lt;div class="type-1"&gt;&lt;/div&gt;
  &lt;div class="type-1"&gt;&lt;/div&gt;
  &lt;div class="type-2"&gt;&lt;/div&gt;  -
  &lt;div class="type-1"&gt;&lt;/div&gt;  -
  &lt;div class="type-1"&gt;&lt;/div&gt;
  &lt;div class="type-2"&gt;&lt;/div&gt;  -
  &lt;div class="type-2"&gt;&lt;/div&gt;
  &lt;div class="type-1"&gt;&lt;/div&gt;  -
  ...
  </code></pre>