Skip to content

Instantly share code, notes, and snippets.

@michaelcarwile
Last active October 14, 2015 01:11
Show Gist options
  • Save michaelcarwile/36386ab189fcbe81e480 to your computer and use it in GitHub Desktop.
Save michaelcarwile/36386ab189fcbe81e480 to your computer and use it in GitHub Desktop.
Font icon as background-image text-replacement.
.icon-bg {
width: 32px; /* required for layout, adjust as needed */
a {
margin-top: -60%; /* adjust as needed */
overflow: hidden; /* required for replacement */
padding-left: 0;
padding-right: 0;
position: relative;
text-indent: 100%;
&:after {
content: '\f099'; /* change as necessary */
position: absolute;
text-align: center;
text-indent: 0; /* part of the magic */
color: inherit;
line-height: 1;
font-family: 'FontAwesome';
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment