JSFiddle - React, Tailwind, and code Playground

by peteng

HTML

<ul>
    <li><a href="#">This is a<br/>long Link</a></li>
</ul>

CSS

a:hover span:first-child {border-top:1px solid green}

JavaScript

$('a').each(function() {
    $(this).contents().filter(function() {
        return this.nodeType == 3;  
    }).wrap('<span></span>');
});