Here is some HTML code along with SCSS that I need help with:
<div class="risk">
<ul>
<li><span>Aggressive</span>Lorem ipsum dolor ...</li>
<li><span>Growth</span>doloremque autem...</li>
</ul>
</div>
The SCSS is as follows:
ul {
list-style: none;
margin: 0;
padding: 0;
li {
margin: 0;
padding: 0 0 0 40px;
span {
&:before {
content: url('data:image/svg+xml;utf8,<svg width="24px" height="24px" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><rect x="1" y="1" rx="6" ry="6" width="22" height="22" style="fill:transparent;stroke:black;stroke-width:1.1;opacity:0.9" ></rect></svg>');
display: inline-block;
width: 30px;
margin-left: -30px;
}
font-weight: bold;
margin-right: 2rem;
}
}
}
How can I align the SVG image with the middle of the LI text?
Various padding and margin options have been attempted, but the image consistently appears higher than the text.