Imagine having a rule like this:
.classA, .classB, li, .classC :nth-child(2) {
margin-top: 5px;
}
This rule will be applied to all the specified classes and elements. But what if you want to exclude the first element that matches the rule? For instance, if you have:
<div class="classA"></div>
<div class="classB"></div>
<div class="classC">
<ol>
<li></li>
<li></li>
</ol>
</div>
You would want the rule to only affect class B and the two list items, excluding class A (first matching element) and ol (not in the specified types). Is there a way to apply the not:first-child selector to a list of classes instead of just one?
For example:
<div class="classB"></div>
<div class="notInList"></div>
<div class="classA"></div>
In this case, the rule should only be applied to the third div, class A, excluding the first (as it's the first match) and the second div (not included in the list).