I am using bootstrap-sass and the font-awesome ( https://github.com/littlebtc/font-awesome-sass-rails) gems. I would like to override the bootstrap font setting from that of font-awesome.
From font-awesome’s site I can override the bootstrap defaults, if I just import if after bootstrap’s import.
@import 'bootstrap';
@import 'font-awesome';
I have done the above, but font-awesome’s font is not overriding. I have pushed my project on github – https://github.com/murtaza52/rails-base. The url is accessible on localhost:3000/posts
I will appreciate if someone can help me overriding bootstraps’s default font with those of font-awesome’s
Modify your
application.css.scssto look like belowWHY?
import "font-awesome"at the top and then definebaseFontFamilybecause that’s what bootstrap uses to definefont-familyfor all the elements. Check Typography and links block in the middle. If youimport bootstrapafter this,FontAwesomewill be used by default.import "scaffolds";line becausescaffolds.css.scsswill reset your font family forbodyelement which will be inherited by every other element.If you can’t avoid importing it before bootstrap. I hope that helps.