Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the easiest way to change the default font in Reactstrap?

I'm styling a MERN project and I'd like to change the default font that Reactstrap (https://reactstrap.github.io/) uses for my React frontend. I've found some answers for changing the default Bootstrap 4 fonts, but I'm not sure how (or if) to apply those to Reactstrap -- any help or leads much appreciated!

like image 433
Cerulean Avatar asked Sep 12 '18 17:09

Cerulean


1 Answers

You can import a css file in the entry file of the application. The css file can contain @import tags to load your custom font. Then you can set the font-family in the body selector tag.

# In entry file
import '/assets/css/mycssfile.css';


# In mycssfiles.css
@import url('https://fonts.googleapis.com/css?family=Open+Sans');

body {
    font-family: 'Open Sans', sans-serif;
}
like image 165
mattdevio Avatar answered Oct 16 '22 07:10

mattdevio