Replaces text within an element with pseudo-element content. For use with the Icon Font mixin.
@include icon-font-replace();Default:
before
Takes a value of either before or after to declare which pseudo-element to use.
Default:
1em
Takes a unit value to set the width of the pseudo-element. Should equal the width of the icon.
.element {
@include icon-font-replace();
}.element {
text-indent: 110%;
white-space: nowrap;
overflow: hidden;
position: relative;
display: inline-block;
width: 1em;
}
.element::after {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
display: block;
text-align: center;
text-indent: 0;
}