JSFiddle - React, Tailwind, and code Playground

by BramVanroy

HTML

<ul>
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
</ul>

CSS

li {
    display: inline-block;
}

li::after {
    height: 30px;
    width: 30px;
    border-right: 1px solid #817C7C;
    content: '';
}

li.last-child::after {
    border: 0 none;
}

JavaScript

$("li:last").addClass("last-child");