I'm struggling to create top-bottom borders for list items with customized decorations. The text of the element should not be hidden under the decoration even if it's too long. Any ideas on how to achieve this?
div {
width: 20%;
}
ul {
list-style-position: inside;
list-style-type: none;
}
li {
border-top: 1px solid;
padding: 0.1em 0.3em;
}
li span {
position: relative;
left: 1em;
}
li::before {
content: "\2022";
color: #800000;
font-size: 1em;
vertical-align: middle;
line-height: 1em;
width: 10px;
}
li:last-of-type {
border-bottom: 1px solid;
}
<div>
<ul>
<li><span>foo</span></li>
<li><span>bar</span></li>
<li><span>very long sentence is here which should be nicely aligned</span></li>
</ul>
</div>