Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save DiegoCarvalho75/687f2bec43689884589a18194dfbc953 to your computer and use it in GitHub Desktop.
Save DiegoCarvalho75/687f2bec43689884589a18194dfbc953 to your computer and use it in GitHub Desktop.
Custom CSS FontAwessome Pseudo Selector
<script src="https://kit.fontawesome.com/96773e460e.js"></script>
<ul style="margin: 0;">
<li><span class="icon login"></span> Login</li>
<li><span class="icon tps"></span> TPS Reports</li>
<li><span class="icon twitter"></span> Twitter</li>
</ul>
<style>
.icon::before {
display: inline-block;
font-style: normal;
font-variant: normal;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
}
.login::before {
font-family: "Font Awesome 5 Free"; font-weight: 900; content: "\f007";
}
.tps::before {
font-family: "Font Awesome 5 Free"; font-weight: 400; content: "\f1ea";
}
.twitter::before {
font-family: "Font Awesome 5 Brands"; content: "\f099";
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment