]> git.ipfire.org Git - ipfire.org.git/blob - src/scss/bootstrap-4.0.0-alpha.6/docs/utilities/typography.md
.gitignore: Add .vscode
[ipfire.org.git] / src / scss / bootstrap-4.0.0-alpha.6 / docs / utilities / typography.md
1 ---
2 layout: docs
3 title: Typography
4 group: utilities
5 ---
6
7 The following utilities can be used to add additional styles to texts.
8
9 ## Contents
10
11 * Will be replaced with the ToC, excluding the "Contents" header
12 {:toc}
13
14 ## Text alignment
15
16 Easily realign text to components with text alignment classes.
17
18 {% example html %}
19 <p class="text-justify">Ambitioni dedisse scripsisse iudicaretur. Cras mattis iudicium purus sit amet fermentum. Donec sed odio operae, eu vulputate felis rhoncus. Praeterea iter est quasdam res quas ex communi. At nos hinc posthac, sitientis piros Afros. Petierunt uti sibi concilium totius Galliae in diem certam indicere. Cras mattis iudicium purus sit amet fermentum.</p>
20 {% endexample %}
21
22 {% example html %}
23 <div class="card">
24 <div class="card-block text-nowrap">
25 Curabitur blandit tempus ardua ridiculus sed magna.
26 </div>
27 </div>
28 {% endexample %}
29
30 For left, right, and center alignment, responsive classes are available that use the same viewport width breakpoints as the grid system.
31
32 {% example html %}
33 <p class="text-left">Left aligned text on all viewport sizes.</p>
34 <p class="text-center">Center aligned text on all viewport sizes.</p>
35 <p class="text-right">Right aligned text on all viewport sizes.</p>
36
37 <p class="text-sm-left">Left aligned text on viewports sized SM (small) or wider.</p>
38 <p class="text-md-left">Left aligned text on viewports sized MD (medium) or wider.</p>
39 <p class="text-lg-left">Left aligned text on viewports sized LG (large) or wider.</p>
40 <p class="text-xl-left">Left aligned text on viewports sized XL (extra-large) or wider.</p>
41 {% endexample %}
42
43 ## Text transform
44
45 Transform text in components with text capitalization classes.
46
47 {% example html %}
48 <p class="text-lowercase">Lowercased text.</p>
49 <p class="text-uppercase">Uppercased text.</p>
50 <p class="text-capitalize">CapiTaliZed text.</p>
51 {% endexample %}
52
53 Note how `text-capitalize` only changes the first letter of each word, leaving the case of any other letters unaffected.
54
55 ## Font weight and italics
56
57 Quickly change the weight (boldness) of text or italicize text.
58
59 {% example html %}
60 <p class="font-weight-bold">Bold text.</p>
61 <p class="font-weight-normal">Normal weight text.</p>
62 <p class="font-italic">Italic text.</p>
63 {% endexample %}