JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Testing PasteHTML.com</title>
</head>
<body>
<ul>
<li><span>Some text goes here</span> <span class="image"><em>test</em></span></li>
<li><span>Some other text goes here</span> <span class="image"><em>test</em></span></li>
<li><span>Short</span> <span class="image"><em>test</em></span></li>
</ul>
</body>
</html>
CSS
ul {
background-color: #FFF;
list-style: none;
margin: 0;
padding: 0;
}
li {
background-color: #F0F0FF;
list-style: none;
margin: 0;
padding: 0;
}
li span {
background-color: #FFF;
display: inline-block;
height: 20px;
padding: 0 .25em;
}
li span.image {
background-color: white;
display: block;
float: right;
width: 20px;
height: 20px;
padding: 0 .25em;
}