JSFiddle - React, Tailwind, and code Playground

by gentooboontoo

HTML

<ul>
  <li>Bar</li>
  <li>Bar</li>
  <li>Bar</li>
  <li>Should have a green background</li>
  <li class='foo'>Bar</li>
</ul>

CSS

li:not(.foo):last-child {
    background-color: green;
}