sexta-feira, 6 de maio de 2016

how to change the font-family of all elements?

hi :)

In order to change the font-family of all elements on your website, you could use that:

* {
    font-family: 'source sans pro'!important;

In my case, I would like to change only a few kind of elements:

a, span, input {
    font-family: 'source sans pro'!important;

But if you have icons that use another font-family like FontAwesome, you may force them to not use what you've set before

i, .icon-home, .icon-user, .icon-shopping-cart {
    font-family: FontAwesome!important;

.fa {
    font-family: FontAwesome-v4!important;

The "!important" was used to force the use of the font-family even if another font-family was set in another place
I often use the "!important" when I'm working in a platform like WordPress and I am changing/overwriting the theme...
On your website you should not use '!important'

Best regards,
Adriano Schmidt

Nenhum comentário:

Postar um comentário