JSFiddle - React, Tailwind, and code Playground

by hiddenloop

HTML

<table>
<td>
   <div class='test'>test1</div>
</td>
</table>

<table>
<td>
   <div class='test'>test2</div>
</td>
</table>

<table>
<td>
   <div class='test'>test3</div>
</td>
</table>

<table>
<td>
   <div class='test'>test4</div>
</td>
</table>

CSS

table:nth-of-type(n<2) {
  .test {
     color: red 
  }
}


table:nth-of-type(n+2) {
  .test {
    color: green
  }
}