I want to use pure CSS to select only the first and last classes throughout the entire document. In my scenario, the structure looks like this:
<div class="Container">
<div>
<div class="Parent"></div>
<pre>
<span>
<span class="myClass">YES</span>
<span class="myClass">NO</span>
<span class="myClass">NO</span>
</span>
</pre>
</div>
<div>
<div class="Parent"></div>
<pre>
<span>
<span class="myClass">NO</span>
<span class="myClass">NO</span>
<span class="myClass">YES</span>
</span>
</pre>
</div>
</div>
NOTE: I am attempting to do this within a real codemirror matchtags context, so I'm uncertain if the provided structure is accurate. Here is the real codemirror matchtags demo