Skip to content

Instantly share code, notes, and snippets.

@munkacsitomi
Created May 29, 2019 08:54
Show Gist options
  • Save munkacsitomi/b3ff4dfa17da5cee90eded8fbb76ade9 to your computer and use it in GitHub Desktop.
Save munkacsitomi/b3ff4dfa17da5cee90eded8fbb76ade9 to your computer and use it in GitHub Desktop.
Replace default bullets in a list to an img with optional vertical center alignment
<ul class="my-list">
<li class="my-list__list-item">First item</li>
<li class="my-list__list-item">Second item</li>
<li class="my-list__list-item my-list__list-item--center">Third item</li>
</ul>
.my-list {
list-style-type: none;
&__list-item {
margin-bottom: 10px;
padding-left: 60px;
&::before {
content: url('tick.png');
margin: 0 -40px;
position: absolute;
width: 20px;
}
&--center {
display: flex;
flex-direction: column;
justify-content: center;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment