FontAwesome inherits parent font-size causing bad rednering -
each fontawesome icon set inherit font-size of parent. however, font best rendered @ specific sizes , if parent has different font-size: 14px;
effect icon quality. question is, why use css this
.fa {font-size: none;} .fa-lg {font-size: 1.33333333em;} .fa-2x {font-size: 2em;} .fa-3x {font-size: 3em;} .fa-4x {font-size: 4em;} .fa-5x {font-size: 5em;}
without knowing what's parent font-size , therefore risk having badly rendered icons , not have this
.fa {font-size: 14px;} .fa-lg {font-size: 19px;} .fa-2x {font-size: 28px;} .fa-3x {font-size: 42px;} .fa-4x {font-size: 56px;} .fa-5x {font-size: 70px;}
where make sure each icon has best possible quality.
so, know why font-awesome using 'em' units on 'px'. right?
reason:
lets have heading text (<h1>
) of size 30px. , paragraph (<p>
) text of 14px. both has icons.
so, if font-awesome icons in fixed size 14px, render body text. small in heading tags, icon in 14px , heading text in 30px.
if use relative size, can use parent's font size, icon , text wont in different sizes.
also, if have fixed size, , if doesn't match website's font size, need manually reset font size every time. people use '13px' base font size , have '15px'.
we don't know users font size particular element, , that's why using em
, rem
units.
if not clear, sorry :(
thanks!
Comments
Post a Comment