I'm using Twitter Bootstrap for a site design and I would like all of the display fonts to use serif (rather than the default sans-serif) font faces. Is there some way to do this without having to recompile via LESS? I would really like to avoid learning LESS for something this basic.
Importing Your Web Font After you extract the zip file you generated above (or if you already have a webfont), right click the Fonts group in Bootstrap Studio and choose Import Webfont . In the file browser, navigate to the webfont and select the css file in the folder.
Bootstrap 4 Default Settings The default font-family is "Helvetica Neue", Helvetica, Arial, sans-serif.
Native font stackThis font-family is applied to the <body> and automatically inherited globally throughout Bootstrap. To switch the global font-family , update $font-family-base and recompile Bootstrap.
Start with the font you want, and always end with a generic family, to let the browser pick a similar font in the generic family, if no other fonts are available. Note: Separate each value with a comma. Note: If a font name contains white-space, it must be quoted.
If you don't mind changing the bootstrap.css, do a find & replace on:
"Helvetica Neue", Helvetica, Arial, sans-serif;
replace with:
Georgia, "Times New Roman", Times, serif;
If you don't want to do that, add this code to your custom CSS to override Bootstrap's.
body,
input,
button,
select,
textarea,
.navbar-search .search-query {
font-family: Georgia, "Times New Roman", Times, serif;
}
You have to change the LESS variable @baseFontFamily
, it's default value is @sansFontFamily
you juste have to set it to @serifFontFamily
.
If you don't want to use LESS you can still change those variables in the Customize menu in the docs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With