Reputation: 1080
What if we use font awesome/css :bfore:After pseudo selector's content code more than one time. Example
#div:before {
font-family: 'FontAwesome';
content:"\f0c9 \f0c9 \f0c9 \f0c9"; /*SEE I USED "\f0c9" more than one time */
}
Live Example: http://jsfiddle.net/1ep1vnL4/
So is this a good practice if i use it on production? becuase i want to use a icon 3 times so i am lazy put 3 new divs and repeat everything again.
Upvotes: 0
Views: 939
Reputation: 21882
Is it bad to use ———
rather than <div>—</div><div>—</div><div>—</div>
?
Font Awesome is just a font... it's the same as using any character from any other font. Using 3 or 4 characters in a :before
pseudo element is not much different than using 3 or 4 characters inside a <p>
tag.
There would be much more overhead if you were to use a different element (div, span, p) for each character.
Upvotes: 1