Bedrock Design System

Typography

TL;DRPermalink to: TL;DR

The Bedrock typographical hierarchy does not match Canvas. This is due to historical design patterns that are not easily changed. Once we have control over our grid on all pages, we can look into making the font sizes match.


OverviewPermalink to: Overview

The type hierarchy is built using rem values with the base font size set to 16px (1rem), aligning to our spacing system.

Bedrock uses Roboto as its primary typeface to match Canvas. We do differ on the type scale due to design debt.

To use the font on web download it(external link) and add this code snippet to your CSS:

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400;
  src: local("Roboto-Regular"),
    url("INSERT/PATH/TO/Roboto-Regular.woff2") format("woff2");
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 700;
  src: local("Roboto-Bold"),
    url("INSERT/PATH/TO/Roboto-Bold.woff2") format("woff2");
}

html {
  font-family: "Roboto", "Helvetica Neue", "Helvetica", Arial, sans-serif;
}

(Remember to replace the "INSERT/PATH/TO" part of the string so that it matches your own folder structure.)


StatusPermalink to: Status

The current hierarchy is a pragmatic mix of a proper typographic hierarchy, and “what was possible” when wanting to clean up the old non-centralised font handling. If we were to adopt the Canvas type size tokens, it would lead to a lot of line breaks.

Road mapPermalink to: Road map

  • Restructure hierarchy and move towards Canvas font sizes
  • Remove 13px font size from <body>

Font StackPermalink to: Font Stack

The font stack contains a number of similar typefaces to support a series of fallbacks for circumstances when Roboto cannot be loaded on a user's device.

'Roboto', 'Helvetica Neue', 'Helvetica', Arial, sans-serif;

HeadlinesPermalink to: Headlines

Our headline styles are decoupled from the h1, h2, h3, etc. tags. This allows designers and engineers to control things like tab-order separately from styling.

It is therefore fine to have a h3-tag with Heading 2 styling if the feature needs it.

VariantFontFont sizeLine height
HeroRoboto Bold40dp125%
Heading 1Roboto Bold32dp125%
Heading 2Roboto Bold24dp125%
Heading 3Roboto Bold20dp125%
Heading 4Roboto Bold16dp125%

ParagraphsPermalink to: Paragraphs

These styles are by far the most used. Text paragraphs, inputs, navigation elements, etc.

VariantFontFont sizeLine height
LargeRoboto40dp140%
Large BoldRoboto Bold40dp140%
MediumRoboto32dp140%
Medium BoldRoboto Bold32dp140%
SmallRoboto24dp140%
Small BoldRoboto Bold24dp140%

ExtraPermalink to: Extra

Small infoPermalink to: Small info

Used for short, informative text.

VariantFontFont sizeLine height
Small infoRoboto10dpauto
Small info BoldRoboto Bold10dpauto

ScorePermalink to: Score

The score numbers are used when showing an actual score. Driver scores, question scores, benchmarks, difference to benchmark. It should not be used on other metrics like participation.

Yes, the naming with 2x medium is suboptimal.

The gigantic score number on the Hero header is not used in any other features, so the styling doesn’t need to be global, and is handled in the feature.

VariantFontFont sizeLine height
Large 32Peakon Brand Numbers32dpauto
Medium 24Peakon Brand Numbers24dpauto
Medium 16Peakon Brand Numbers16dpauto
Small 12Peakon Brand Numbers12dpauto

LabelPermalink to: Label

Only used for labels on form controls. Small has been deprecated after the transition to Workday’s UI aesthetic. We no longer have small controls.

VariantFontFont sizeLine height
LargeRoboto Bold14dpauto
MediumRoboto Bold12dpauto

SizesPermalink to: Sizes

We recommend using the styles above for as much as possible, but if overrides are needed, here are the size variables:

Figma size (px)NameValue (rem)
10font-size-3xs0.625rem
12font-size-xs0.75rem
14font-size-sm0.875rem
16font-size-md1rem
20font-size-lg1.25rem
24font-size-xl1.5rem
32font-size-2xl2rem
40font-size-3xl2.5rem

AccessibilityPermalink to: Accessibility

There is no minimum text size success criteria in WCAG 2.1 AA, however we must ensure that the text respects zooming in the browser. Refer to Color usage › Text to pick the text colors with correct contrast.