Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does twitter bootstrap have any font-size utility classes?

I can't find any utility classes for changing the font size in Bootstrap. There are utility classes for margins and padding, etc. There are display classes for headings and there's a lead class for paragraphs, but is there any way to make a specific piece of text larger and smaller with a utility class in html instead of having to add some css?

I find it's easier to mock up designs quickly using as many utility classes as possible before abstracting common patterns into custom css.

I've combed through the Bootstrap Text Utilities docs and the Typography docs, but can't find anything. Am I missing something or does this just not exist in Bootstrap? This seems like something Bootstrap would offer offer—the ability to change the text size by adding a class name like t-1, t-2, t-3, t-4, etc.

I'm not talking about responsive typography, just changing the default font size with a utility class instead of writing css.

like image 278
Lee McAlilly Avatar asked Apr 17 '19 17:04

Lee McAlilly


People also ask

What is the font-size class in bootstrap?

Bootstrap 4 uses a default font-size of 16px, and its line-height is 1.5. The default font-family is "Helvetica Neue", Helvetica, Arial, sans-serif.

Is the default bootstrap global font-size?

Bootstrap's Default Settings Bootstrap's global default font-size is 14px, with a line-height of 1.428.

Can you change font with bootstrap?

How to Change the Bootstrap Font Family for All Headlines. Add a google font stylesheet below the Bootstrap CSS stylesheet. Add this to your theme stylesheet to override Bootstrap's default values.

What are bootstrap typography classes?

text-center: It is used to align the text to the center. list-inline: It is used to make the element of the list inline. text-truncate: It is used to shorten the longer text by truncating with an ellipsis. text-uppercase: It is used to transform text to uppercase.


1 Answers

The comments here seem to have overlooked the h1-h6 tags and corresponding .h1, .h2, .h3, .h4, .h5 and .h6 classes, as well as the .display1, .display2, .display3 and .display4 classes for extra large font size. Oh, there's also the small tag and .small class!

like image 120
pureth Avatar answered Sep 20 '22 09:09

pureth