Typography
Search the component library

Typography

v1.0.0-beta.3
Download UI Kit v1.9.0

This component provides standard typographic styles for the platform.

Download UI Kit v1.9.0

Usage Guidelines

Every instance of text should use a type style defined in this component. If you find a use case not covered by the styles here, make a request to modify this component. (Keeping all type styles in a single component makes it easy to maintain and update them.)

Features

  • Single collection of all typographic styles
  • Label styles for UI messages
  • Title styles for UI headings
  • Copy styles for content
  • Inline styles (links, super/sub-script, etc.)
  • Meets accessibility contrast requirements

Dependencies

None

Font Stacks

All textual elements use the following font stacks:

font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-family: Monaco, 'Lucida Console', monospace;

Labels

Much of the typography used in a web application consists of short names, labels, or single line bits of content. For example, in Console the course tile displays information like instructor names and course dates with labels.

An example of labels in use on the Console course tile

Size Variants

There are four different sizes of label, Basic, Small, Large, and Bold:

Labels should primarily be used in single line scenarios. Make a particular effort to avoid using bold labels in a multi-line manner.

The four label sizes

Color Variants

Labels come in two colors, Primary and Secondary. There is an inverse palette available as well.

Standard colors

Inverse colors

Allowed Inline Elements

In general, labels should not be styled beyond the basic styles listed above. If necessary, stick to the following list of inline elements.

  • <em>, <i>
  • <a>
  • <small>
  • <time>
  • <abbr>

Titles

Titles are very similar to labels except they demarcate a logical section or container of content. In the previous example, the course name would be a title.

Standard colors

Size Variants

There are three different sizes of title: Basic, Large, and Extra Large. These sizes will automatically scale down in narrow viewports.

Standard title sizes, multiline versions, and the responsive sizes used when the viewport is narrower.

Allowed Inline Elements

In general, titles should not be styled beyond the basic styles listed above. If necessary, stick to the following list of inline elements.

  • <em>, <i>
  • <small>
  • <time>
  • <abbr>

Copy

When you have a chunk of content to display, use one of these styles.

Basic Body

Most regular content will use the Basic Body style.

Small variant

There is a smaller variant available which should be used when the line length is shorter.

Lead Variant

There is also a Lead variant which can be used for the first paragraph of a message or as part of a hero block for marketing materials.

It will automatically scale down for narrow viewports as well.

Lists

Both ordered and unordered lists are supported with a nesting depth of three. These should be used to present content within a copy block, not for UI elements.

Code

Blocks of code (typically <pre> tags) are styled on a dark background. (See also the inline elements <code> and <kbd>.)

Allowed Inline Elements

Copy is more flexible in this regard that labels or titles. You can include any of the inline elements covered by this component.

Headings

Headings pair with copy styles to delineate sections within blocks of content. They should not be used for UI elements (see titles instead).

There are six different levels available and should be used in order.

These headings don’t change size as the viewport narrows.

Inline Elements

There are a number of inline elements which can be used to modify the other type styles (see the list of allowed inline elements for each type style).

Basic Elements

  • <a>
  • <em>, <i>
  • <strong>, <b>
  • <u>
  • <del>, <s>
  • <ins>
  • <q>
  • <sub>, <sup>
  • <mark>
  • <code>, <kbd>

Non-visible Elements

Some inline elements should be used only for semantic reasons and don’t effect the visual style. These include:

  • <small> (note: this element is used to represent side-comments and small print, including copyright and legal text, independent of its styled presentation)
  • <time>
  • <abbr>

Redlines

Labels

Sizes

Small
  • 13px font-size
  • 15px line-height
Basic
  • 14px font-size
  • 16px line-height
Large
  • 16px font-size
  • 18px line-height
Bold
  • 14px font-size
  • 16px line-height
  • bold font-weight

Colors

Primary (Light)
  • #231F20
Secondary (Light)
  • #565656
Primary (Dark)
  • #FFFFFF
  • light font-weight
Secondary (Dark)
  • #AEAEAE
  • light font-weight

Titles

Sizes

Basic
  • 22px font-size
  • 28px line-height
Large
  • 24px font-size
  • 30px line-height
XL
  • 30px font-size
  • 36px line-height

At narrow viewports (< 480px):

Basic
  • 18px font-size
  • 22px line-height
Large
  • 20px font-size
  • 24px line-height
XL
  • 22px font-size
  • 28px line-height

Color

All titles are colored #231F20.

Regular title sizes

Title sizes for narrow viewports (< 480px)

Copy

Basic Body

Font
  • 16px font-size
  • 22px line-height
Color
  • #231F20
Margins:
  • Adjacent paragraphs are separated by 12px
  • Leave top/bottom padding for a block of p tags up to the consumer
Small Size
Font
  • 14px font-size
  • 20px line-height

Standard body copy

Smaller body copy used for narrower line length

Lead

Font
  • 20px font-size
  • 28px line-height
  • light font-weight
Color
  • #231F20

Narrow Lead

At narrow viewports (<480px) the lead styles become:

Font
  • 18px font-size
  • 24px line-height
  • thin font-weight
Color
  • #231F20

Lists

These lists should be used to communicate content within a copy block, not as UI elements.

Font
  • Inherit the containing body copy
Spacing
  • 12px above and below a list
  • 6px between list items
  • Lists that immediately follow a header should contribute no top margin
Padding
  • The first level of a list has 26px of left padding
  • Sublists have 20px of padding

Code

Font
  • Monospace font stack
  • 14px font-size
  • 20px line-height
Color
  • #AEAEAE
  • #424242 background-color

Headings

Fonts

Level 1
  • 24px font-size
  • 30px line-height
  • bold font-weight
  • 2px bottom border, #A6A8AB
  • #231F20 color
Level 2
  • 20px font-size
  • 24px line-height
  • bold font-weight
  • #231F20 color
Level 3
  • 18px font-size
  • 22px line-height
  • bold font-weight
  • #231F20 color
Level 4
  • 16px font-size
  • 20px line-height
  • bold font-weight
  • #565656 color
Level 5
  • 16px font-size
  • 20px line-height
  • italic font-style
  • #565656 color
Level 6
  • 14px font-size
  • 16px line-height
  • italic font-style
  • #565656 color

Spacing

Header that follows a header
  • 6px margin
  • 40px if top header is Level 1
Header that follows content
  • 20px margin

Margins can be customized to meet a layout if necessary.

Inline Elements

<small>, <time>, <abbr>
  • Same as the ‘Basic Text’ label
<a>
  • Active link = hyperdrive (#0D65A6) and underline
  • Hover link = Royal Navy (#094877), no underline
<mark>
  • #FDEC2E background-color
  • Only use within Body Copy
<em>, <i>
  • italic font-style
<strong>, <b>
  • bold font-weight
<del>, <s>
  • line-through text-decoration
  • #565656 color on light backgrounds
  • #AEAEAE color on dark backgrounds
<ins>
  • underline text-decoration
  • cap with ‘+’ symbol
<sup>
  • vertical-align: baseline
  • position: relative
  • top: 0.2em
  • font-size: 90%
<sub>
  • vertical-align: baseline
  • position: relative
  • top: -0.2em
  • font-size: 90%
<q>
  • cap with quotes from user’s locale
<code>, <kbd>
  • Monospace font stack
  • #E6E6E6 background-color
  • 4px horizontal padding

Changelog

1.0.0-beta.3

  • ADDED: Small body copy variant
  • ADDED: Sketch mockup
  • ADDED: Illustrator mockup
  • CHANGED: Lists positioning is now more amenable to the default browser model
  • FIXED: Correctly sized images
  • FIXED: Was missing redlines for links
  • FIXED: Was missing line-height info for headers

1.0.0-beta.2

  • ADDED: Style for code blocks (e.g. <pre> tags)
  • ADDED: Style for <code> and <kbd> inline elements
  • ADDED: Heading styles
  • ADDED: Styles for ordered and unordered lists within copy
  • CHANGED: Redlines are now included directly in the page, rather than in a .zip file

1.0.0-beta.1

Initial version