Skip to content

Instantly share code, notes, and snippets.

@cball
Created March 8, 2012 00:49
Show Gist options
  • Save cball/1997641 to your computer and use it in GitHub Desktop.
Save cball/1997641 to your computer and use it in GitHub Desktop.
Icon Font Usage
/* method taken from http://pictos.cc/articles/using-icon-fonts/ */
[data-icon]:before {
font-family: 'IcoMoonRegular';
content: attr(data-icon);
-webkit-font-smoothing: antialiased;
}
.icon {
strong {
text-indent: -99999px;
}
}
<!-- icon w/ text -->
<a href="">
<span aria-hidden="true" data-icon="C"></span>
Cool Link
</a>
<!-- icon w/out text -->
<a href="" class="icon">
<span aria-hidden="true" data-icon="C"></span>
<strong>Cool Link</strong>
</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment