Typography =============================================================================== Headings -------- All HTML headings, :code:`
` (paragraphs) receive a bottom margin of half their computed line-height
(10px by default).
.. container:: bs-example
Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque
penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id
dolor id nibh ultricies vehicula.
Cum sociis natoque penatibus et magnis dis parturient montes, nascetur
ridiculus mus. Donec ullamcorper nulla non metus auctor fringilla. Duis
mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia
odio sem nec elit. Donec ullamcorper nulla non metus auctor fringilla.
Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id
elit non mi porta gravida at eget metus. Duis mollis, est non commodo
luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.
.. code::
:class: highlight
...
Lead body copy
++++++++++++++
Make a paragraph stand out by adding lead.
.. container:: bs-example
.. lead:: Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor
auctor. Duis mollis, est non commodo luctus.
.. code::
:class: highlight
.. lead:: Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor
auctor. Duis mollis, est non commodo luctus.
Built with Less
+++++++++++++++
The typographic scale is based on two Less variables in **variables.less**:
`@font-size-base` and `@line-height-base`. The first is the base font-size used
throughout and the second is the base line-height. We use those variables and
some simple math to create the margins, paddings, and line-heights of all our
type and more. Customize them and Bootstrap adapts.
Emphasis
--------
Make use of HTML's default emphasis tags with lightweight styles.
Small text
++++++++++
For de-emphasizing inline or blocks of text, use the `small` tag to set text at
85% the size of the parent. Heading elements receive their own font-size for
nested `small` elements.
.. container:: bs-example
:small:`This line of text is meant to be treated as fine print.`
.. code::
:class: highlight
:small:`This line of text is meant to be treated as fine print.`
Bold
++++
For emphasizing a snippet of text with a heavier font-weight.
.. container:: bs-example
The following snippet of text is **rendered as bold text**.
.. code::
:class: highlight
The following snippet of text is **rendered as bold text**.
Italics
+++++++
For emphasizing a snippet of text with italics.
.. container:: bs-example
The following snippet of text is *rendered as italicized text*.
.. code::
:class: highlight
The following snippet of text is *rendered as italicized text*.
.. admonition:: :h4:`Alternate elements`
:class: bs-callout bs-callout-info
Feel free to use `` and `` in HTML5. `` is meant to highlight words or
phrases without conveying additional importance while `` is mostly for
voice, technical terms, etc.
Alignment classes
+++++++++++++++++
Easily realign text to components with text alignment classes.
.. container:: bs-example
.. class:: text-left
Left aligned text.
.. class:: text-center
Center aligned text.
.. class:: text-right
Right aligned text.
.. class:: text-justify
Justified text.
.. code::
:class: highlight
.. class:: text-left
Left aligned text.
.. class:: text-center
Center aligned text.
.. class:: text-right
Right aligned text.
.. class:: text-justify
Justified text.
Lists
-----
Unordered
+++++++++
A list of items in which the order does *not* explicitly matter.
.. container:: bs-example
* Lorem ipsum dolor sit amet
* Consectetur adipiscing elit
* Integer molestie lorem at massa
* Facilisis in pretium nisl aliquet
* Nulla volutpat aliquam velit
* Phasellus iaculis neque
* Purus sodales ultricies
* Vestibulum laoreet porttitor sem
* Ac tristique libero volutpat at
* Faucibus porta lacus fringilla vel
* Aenean sit amet erat nunc
* Eget porttitor lorem
.. code::
:class: highlight
* Lorem ipsum dolor sit amet
* Consectetur adipiscing elit
...
Ordered
+++++++
A list of items in which the order *does* matter.
.. container:: bs-example
1. Lorem ipsum dolor sit amet
#. Consectetur adipiscing elit
#. Integer molestie lorem at massa
#. Facilisis in pretium nisl aliquet
#. Nulla volutpat aliquam velit
#. Faucibus porta lacus fringilla vel
#. Aenean sit amet erat nunc
#. Eget porttitor lorem
.. code::
:class: highlight
1. Lorem ipsum dolor sit amet
#. Consectetur adipiscing elit
...
Unstyled
++++++++
Remove the default `list-style` and left margin on list items (immediate children
only). **This only applies to immediate children list items**, meaning you will
need to add the class for any nested lists as well.
.. container:: bs-example
.. class:: list-unstyled
* Lorem ipsum dolor sit amet
* Consectetur adipiscing elit
* Integer molestie lorem at massa
* Facilisis in pretium nisl aliquet
* Nulla volutpat aliquam velit
* Phasellus iaculis neque
* Purus sodales ultricies
* Vestibulum laoreet porttitor sem
* Ac tristique libero volutpat at
* Faucibus porta lacus fringilla vel
* Aenean sit amet erat nunc
* Eget porttitor lorem
.. code::
:class: highlight
.. class:: list-unstyled
* Lorem ipsum dolor sit amet
* Consectetur adipiscing elit
...
Inline
++++++
.. container:: bs-example
.. class:: list-inline
* Lorem ipsum
* Phasellus iaculis
* Nulla volutpat
.. code::
:class: highlight
.. class:: list-inline
* Lorem ipsum
* Phasellus iaculis
* Nulla volutpat
Description
+++++++++++
.. container:: bs-example
A list of terms with their associated descriptions.
Description lists
A description list is perfect for defining terms.
Euismod
Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.
Donec id elit non mi porta gravida at eget metus.
Malesuada porta
Etiam porta sem malesuada magna mollis euismod.
.. code::
:class: highlight
Description lists
A description list is perfect for defining terms.
Euismod
Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.
Donec id elit non mi porta gravida at eget metus.
Malesuada porta
Etiam porta sem malesuada magna mollis euismod.
Horizontal description
~~~~~~~~~~~~~~~~~~~~~~
Make terms and descriptions in line up side-by-side. Starts off stacked
like default
s, but when the navbar expands, so do these.
.. container:: bs-example
.. class:: dl-horizontal
Description lists
A description list is perfect for defining terms.
Euismod
Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.
Donec id elit non mi porta gravida at eget metus.
Malesuada porta
Etiam porta sem malesuada magna mollis euismod.
.. code::
:class: highlight
.. class:: dl-horizontal
Description lists
A description list is perfect for defining terms.
Euismod
Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.
Donec id elit non mi porta gravida at eget metus.
Malesuada porta
Etiam porta sem malesuada magna mollis euismod.
.. admonition:: :h4:`Auto-truncating`
:class: bs-callout bs-callout-info
Horizontal description lists will truncate terms that are too long to fit in
the left column with `text-overflow`. In narrower viewports, they will change
to the default stacked layout.