Last active
October 14, 2015 01:11
-
-
Save michaelcarwile/36386ab189fcbe81e480 to your computer and use it in GitHub Desktop.
Font icon as background-image text-replacement.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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