Fonts

There are a number of styling choices for text elements. You can use them to apply font faces, increase or decrease text size, make your text bold, etc.

  1. Font Sizes
  2. Font Weights
  3. Font Styles
  4. Text Colors
  5. Line Heights
  6. Cutting Off Text
  7. Headline Styles

Font Sizes

You can use these classes to make your font smaller or larger. Absolute sizes may differ depending on the size of the display. (For more information, see Standard Values – Font Sizes.)

Text with different font sizes
<p class="font-xs">
    Tiny text you don't want anybody to read
</p>

Tiny text you don't want anybody to read

<p class="font-s">
    Small text
</p>

Small text

<p class="font-standard">
    Standard-sized text
</p>

Standard-sized text

<p class="font-m">
    Slightly larger-than-usual text
</p>

Slightly larger-than-usual text

<p class="font-l">
    Noticeably larger-than-usual text
</p>

Noticeably larger-than-usual text

<p class="font-xl">
    Pretty large text (h3)
</p>

Pretty large text (h3)

<p class="font-xxl">
    Text that's so large it's basically
    in your face (h2)
</p>

Text that's so large it's basically in your face (h2)

<p class="font-xxxl">
    Humongous Text that no-one could
    possibly miss
    (h1 headline)
</p>

Humongous Text that no-one could possibly miss (h1)

Since all classes are root-size based, you can nest as many size declarations as you want without causing unwanted multiplications, as would be the case with parent-relative sizes.

Nested font sizes
<h1 class="font-xxl">
    Outer layer
    <span class="font-standard">
        Middle layer
        <span class="font-l">
            Inner layer
        </span>
    </span>
</h1>

Outer layer Middle layer Inner layer

Font Weights

You can change the weight (or thickness) of your text by applying the font-bold, font-semibold, or font-light classes. If you want a previously bolded text to be displayed with normal font weight, use font-normal.

Text with different font weights
<p class="font-bold">
    Bold text
</p>

Bold text

<p class="font-semibold">
    Semi-bold text
</p>

Semi-bold text

<p class="font-normal">
    Standard text
</p>

Standard text

<p class="font-light">
    Light text
</p>

Light text

Font Styles

You can use these classes to make your text italic, strike it through, make all letters uppercase, or capitalize each word.

Text with different font styles
<p class="font-italic">
    Italic text
</p>

Italic text

<p class="font-strike">
    You shouldn't see this, except you should,
    but not really.
</p>

You shouldn't see this, except you should, but not really.

<p class="font-uppercase">
    I like to shout!
</p>

I like to shout!

<h4 class="font-capitalized">
    For when every word in a text should begin
    with an uppercase letter.
</h4>

For when every word in a text should begin with an uppercase letter.

Text Colors

There are a number of colors you can give your text, including signal colors for status information and others to make the text either more or less visible.

Font with different colors
<p class="font-lightgray">
    Roses are gray, violets are gray…
</p>

Roses are gray, violets are gray…

<p class="font-white" style="background-color: #000;">
    I am white on black.
</p>

I am white on black.

Colors

These are the colors you can use.

Plain Colors

Regular
font-regular
Light gray
font-lightgray
White
font-white

Status Information

Confirmation
font-confirm
Information
font-info
Warning
font-warning
Error
font-error

CI Colors

Brand orange
font-brandorange

Line Heights

These classes will change the line height of the element. The line height determines how much whitespace there is above and below the text within each line.

Text with different line heights
<p class="font-line-standard">
    Text with the standard line height,
    suitable for block texts. Oh, and
    some additional text so we have a
    line break.
</p>

Text with the standard line height, suitable for block texts. Oh, and some additional text so we have a line break.

<p class="font-line-s">
    Text with a small line height.
    It has less whitespace
    above or below the text.
</p>

Text with a small line height. It has less whitespace above or below the text.

<p class="font-line-xs">
    Text with extra small line height. It has
    hardly any whitespace between lines and is
    useful in places where vertical space is
    scarce, or where text blocks are very narrow.
</p>

Text with extra small line height. It has hardly any whitespace between lines and is useful in places where vertical space is scarce, or where text blocks are very narrow.

Cutting Off Text

When you need to make sure that a certain text takes up only one line, regardless of its length, you can use the font-ellipsis class.

The text will be cut off at the end of the first line, and instead show an ellipsis (…) to indicate that more follows.

Text with different font styles
<dl class="grid gutter">
    <dt class="grid-item one-third">
        E-Mail:
    </dt>
    <dd class="grid-item two-thirds">
        <span class="font-ellipsis">
            really-long.user-e-mail@ludicrously-named-provider.example
        </span>
    </dd>
</dl>
really-long.user-e-mail@ludicrously-named-provider.example

Headline Styles

Headlines from H1 to H6 are styled with more or less emphasis to signify their respective place in the document hierarchy. Depending on the context, you may need to apply those default styles to other elements.

To make an element look like a specific type of headline without actually being one, use the font-hn classes, where “n” is the desired headline tier (1-6).

Nested top-tier headlines with consistent visuals
<main class="text-spacing">
    <h1>Cheese (H1)</h1>
    <p>
        Cheese is a food. There are several types of cheese,
        many of them delicious.
    </p>
    <section class="text-spacing">
        <h2>Types of Cheese (H2)</h2>
        <p>
            There are more than twelve and probably less than a million different types of cheese.
        </p>
        <article class="text-spacing">
            <h1 class="font-h3">Cheddar (H1)</h1>
            <p>
                Cheddar is a cow cheese. It goes well on crackers.
            </p>
            <section class="text-spacing">
                <h2 class="font-h4">Types of Cheddar (H2)</h2>
                <p>
                    Cheddar is generally agreed to originate on the dark side of the moon.
                    However, adequate variations from nearer parts have found their way into the markets in recent years.
                </p>
            </section>
        </article>
    </section>
    <section class="text-spacing">
        <h2>Disambiguation (H2)</h2>
        <h3>Photography (H3)</h3>
    </section>
</main>

Cheese (H1)

Cheese is a food. There are several types of cheese, many of them delicious.

Types of Cheese (H2)

There are more than twelve and probably less than a million different types of cheese.

Cheddar (H1)

Cheddar is a cow cheese. It goes well on crackers.

Types of Cheddar (H2)

Cheddar is generally agreed to originate on the dark side of the moon. However, adequate variations from nearer parts have found their way into the markets in recent years.

Disambiguation (H2)

Photography (H3)