SCSS
by joshmoto
HTML
<ul>
<li><a href="#">First item</a></li>
<li><a href="#">Second item</a></li>
</ul>
CSS
:root {
--DodgerBlue: #1E90FF;
--MediumSlateBlue: #7B68EE;
}
ul {
padding: 0;
}
li {
list-style: none;
line-height: 20px;
display: flex;
align-items: center;
justify-content: flex-start;
margin-bottom: 10px;
}
li a {
color: var(--DodgerBlue);
text-decoration: none;
}
li::before {
background: var(--DodgerBlue);
content: '';
display: inline-flex;
width: 20px;
height: 20px;
margin-right: 10px;
mask-repeat: no-repeat;
-webkit-mask-repeat: no-repeat;
}
li:hover a {
color: var(--MediumSlateBlue);
}
li:hover::before {
background: var(--MediumSlateBlue);
}
li:nth-child(1)::before {
mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'%3E%3C/path%3E%3Cpolyline points='9 22 9 12 15 12 15 22'%3E%3C/polyline%3E%3C/svg%3E");
-webkit-mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'%3E%3C/path%3E%3Cpolyline points='9 22 9 12 15 12 15 22'%3E%3C/polyline%3E%3C/svg%3E");
}
li:nth-child(2)::before {
mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='black' viewBox='0 0 16 16'%3E%3Cpath d='M0 1.146C0 .513.526 0 1.175 0h13.65C15.474 0 16 .513 16 1.146v13.708c0 .633-.526 1.146-1.175 1.146H1.175C.526 16 0 15.487 0 14.854V1.146zm4.943 12.248V6.169H2.542v7.225h2.401m-1.2-8.212c.837 0 1.358-.554 1.358-1.248-.015-.709-.52-1.248-1.342-1.248-.822 0-1.359.54-1.359 1.248 0 .694.521 1.248 1.327 1.248h.016zm4.908 8.212V9.359c0-.216.016-.432.08-.586.173-.431.568-.878 1.232-.878.869 0 1.216.662 1.216...