.type: the typography component. Headings, paragraphs and text blocks.
.size: valuethe font size or text size that measures the size of characters, respecting multiples and divisions of the base unit. Values in rem units.
.height: valuethe distance from the baseline of a line of text to the tallest ascender or highest point of uppercase letters respecting multiples and divisions of the base unit. Values in rem units.
.align: value the positioning of text or elements within a line, block, or page. Values in left, right and center.
.style: value refers to extra decoration in appearance and specific characteristics of a typeface. Values in italics and underline.
.spacing: value the white space, or negative space, between letters. Values in rems units.
.color: value the color of the font. Values in hex or semantic assigned value terms based on color system.
.x: number multiples or divisions of the base unit that represent rems for size, height and letter spacing. 1 base unit equals 8px/0.5rem.
Tokens and variables
Universal values
Base
ow.type
Sets the type's font, size, height, leading, colour, spacing and style as well characters per line. It applies either to a text block, a heading or a paragraph.
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
Sets the type's color to subtle. It applies either to a text block, a heading or a paragraph.
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
Sets the type's color to disabled. It applies either to a text block, a heading or a paragraph.
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
Sets the type's weight to medium. It applies either to a text block, a heading or a paragraph.
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
Sets the type's case to capitals. It applies either to a text block, a heading or a paragraph.
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
Sets the type to underline. It applies either to a text block, a heading or a paragraph.
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
Reverse's the type's direction. It applies either to a text block, a heading or a paragraph.
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
Sets the type's line height value to the same as the type's size. It defers depending the type size. It applies either to a text block, a heading or a paragraph.
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
Sets the type's size and height. It applies either to a text block, a heading or a paragraph.
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
Sets the type's size and height. It applies either to a text block, a heading or a paragraph.
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
Sets the type's size and height. It applies either to a text block, a heading or a paragraph.
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
Sets the type's size and height. It applies either to a text block, a heading or a paragraph.
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
Sets the type's size and height. It applies either to a text block, a heading or a paragraph.
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
Sets the type's size and height. It applies either to a text block, a heading or a paragraph.
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
Sets the type's size and height. It applies either to a text block, a heading or a paragraph.
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
Sets the type's size and height. It applies either to a text block, a heading or a paragraph.
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
Sets the type's size and height. It applies either to a text block, a heading or a paragraph.
Heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
One's typographic system uses IBM*, normal (400) and bold (700) sans font, respecting the 8px mini unit while it scales.
* Fall back font: System Sans Serif per operating system.
IBM Plex Sans normal 400
IBM regular is used for the body as well as atoms, components and UI content in general, like UI intros or UI landing pages or sections.
IBM Plex Sans Semibold 600
IBM regular is used for headings
Scale, style and vertical rhythm
The One type scale was created to provide hierarchy for all types of experiences based on a single formula. The formula assumes that the smallest size is 12px and increases plus 0.5 base unit (4px/0.25rem).
The line height is always plus 1 base unit (8px/0.5rem) of the font size.
The below example demonstrates this very size-height relation.
12/20px - x1.5/x2.5bs Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla.
* 14/22px - x1.75/x2.75bs Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla.
16/24px - x2/x3bs Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla.
20/28px - x2.5/x3.5bs Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla.
24/32px - x3/x4bs Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.
28/36px - x3.5/x4.5bs Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.
32/40px - x4/x5bs Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.
36/44px - x4.5/x5.5bs Lorem ipsum dolor sit amet, consectetur adipiscing elit.
40/48px - x5/x6bs Lorem ipsum dolor sit amet, consectetur adipiscing elit.
44/52px - x5.5/x6.5bs Lorem ipsum dolor sit amet, consectetur adipiscing elit.
48/56px - x6/x7bs Lorem ipsum dolor sit amet, consectetur adipiscing elit.
52/60px - x6.5/x7.5bs Lorem ipsum dolor sit amet, consectetur adipiscing elit.
56/64px - x7/x8bs Lorem ipsum dolor sit amet, consectetur adipiscing elit.
60/68px - x7.5/x8.5bs Lorem ipsum dolor sit amet, consectetur adipiscing elit.
64/72px - x8/x9bs Lorem ipsum dolor sit amet, consectetur adipiscing elit.
68/76px - x8.5/x9.5bs Lorem ipsum dolor sit amet, consectetur.
72/80 - x9/x10bs Lorem ipsum dolor sit amet, consectetur.
76/84 - x9.5/x10.5bs Lorem ipsum dolor sit amet, consectetur.
80/88px - x10/x11bs Lorem ipsum dolor sit amet, consectetur.
84/92px - x10.5/x11.5 Lorem ipsum dolor sit amet, consectetur.
88/96px - x11/x12bs Lorem ipsum dolor sit amet
92/100px - x11.5/x12.5bs Lorem ipsum dolor sit amet
96/104px - x12/x13bs Lorem ipsum dolor sit amet
Type scale and usage
The below table displays the most frequently used typographic sizes and line heights the One Design System is using and where.
To be revised
px
rem
base unit (x)
name
usage
12/16
0.75/1
x1.5/x2
Caption
Input label
Tooltip
Chip
Captions
Helper text
Badge label
14/18
0.875/1.125
x1.75/x2.25
Body Small
List
Button medium and small
Table header
Button navigation
Subtitle 2
List subhead
Menu item
16/20
1/1.5
x2/x2.5
Body
Body
Button large
Alert title
Input field
Subtitle 1
20/28
1.25/1.75
x2.5/x3.5
Heading 6
UI components and UI content design.
UI sections and landing pages
To be added per component
24/32
1.5/1.5
x3/x4
Heading 5
UI sections and landing pages
To be added per component
28/36
1.75/2.25
x3.5/x4.5
Heading 4
UI sections and landing pages
32/40
2/2.5
x4/x5
Heading 3
UI sections and landing pages
36/48
2.25/2.75
x4.5/x6
Heading 2
UI sections and landing pages
40/48
2.5/3
x5/x6
Heading 1
UI sections and landing pages
Accessibility
Accessibility and inclusive design are important to consider when designing for screens. Let’s look at some easy places to start making design more accessible and inclusive when it comes to typography.
Font legibility
Thin fonts are extremely difficult to read — not only in Headings, but especially in paragraphs. Make sure your font is no smaller than 16 pixels (1rem) for body text.
Alignment of text
Uneven vertical alignment on chunks of text (when text is centered, for example) can create a difficult reading experience. A jagged alignment makes it tough for the reader to follow from line to line.
All caps
Languages that distinguish between capitalised and lowercase letters are often far more legible when written in sentence case (e.g., “Sentence case”) or title case (e.g., “Title Case”). Essentially, you write out your text only using capitalisation where it’s needed or expected. All caps can introduce a heavier cognitive load for the reader, especially in longer paragraphs. Screen readers announce all caps as individual letters, interrupting the flow and making it difficult to understand. Consider limiting the use of all caps on longer strings of text.
Underlined text
There’s an expectation on the web that underlined text indicates a hyperlink. If you’re trying to draw emphasis, consider using different UX tactics.
Color contrast
Contrast is the measurement of the difference between background and foreground. Low contrast would be something like somewhat lighter grey on somewhat darker grey. Or maroon on red. Or purple on pink. High contrast doesn’t mean we stop considering other things like font weight (a super thin font that happens to have high-contrast against the background is still super illegible.) But higher contrast usually leads to increased legibility, which is a great thing. And you can check the colour contrast of your designs and learn more about best practices with these excellent colour contrast tools:
TPG’s Color Contrast Analyser
Tanaguru contrast finder
WebAIM’s Contrast Checker
Colorable
Characters per line
Set limits on the maximum width of a text element to however many characters you want in a line using CH. (66 CH is equal to 66 zeroes in whatever font you’ve selected). We recommend 66 characters per line, like this example.
Line height
Text with adequate line height makes it much less overwhelming and easier to track across and down a page. Your line height should be at least +8px the font size for paragraphs and blocks of text.
Use clear, descriptive, sequential headings
Unstructured web content is overwhelming and unusable for everyone, but especially for people with cognitive disabilities and those who use screen readers. Headings organise content and guide readers through your site. Your headings should make it easy to skim a page and get a clear purpose and overview of content without having to read body copy.
Do
Use one H1 per page that describes its purpose (or only use multiple H1s when a page truly has more than one purpose).
Nest headings in order (e.g., H3 under H2)
Don't
Use heading levels to show visual differences.
Use heading text just to be compliant — make sure it’s useful
Use responsive text sizes
Browsers provide a built-in way for site visitors to adjust the base text size for websites, zoom in to content, and enlarge sites to a more comfortable viewing size. However, text styled in pixel (px) units ignore the browser’s text size setting, preventing site visitors from enlarging text for more comfortable reading and creating a poor user experience. Adding a “viewport” meta tag with the values “user-scalable=no” or “maximum-scale=1.0” can also prevent users from zooming in to view content.
To create an accessible reading experience, use root ems (rem) units for text size. Rems are relative to the base text size defined by the site visitor and respect the site visitor’s browser preferences.
Do
Style text size with REM units. People with low vision sometimes resize text larger than the 16px default.
Don't
Style text size with pixel (px) units.
Add the “user-scalable” or “maximum-scale” values to the “viewport” meta tag
Resise
People with low vision sometimes resize text larger than the 16px default. When we set font sizes in absolute units, like px, the page doesn’t always respect the user’s preference and instead shows the text at the font-size authored.
Let’s look at some best practices to make sure users can resize text on your site. WCAG reference:1.4.4 Resize text
Do
Style text size with rem units. People with low vision sometimes resize text larger than the 16px default.
Use relative units like em, %, and viewport width/height (VH, VW) for all spacing and length properties.
Set body font size to 100% or 1rem, in order to respect the browser preference. Use rem and em units appropriately for spacing units depending on if an element needs to scale based on the body or the inherited type scale.
Make sure viewport zoom isn’t disabled
Don't
Never use absolute units (px, pt) for lengths.
Don’t disable zoom. People with partial vision and low vision enlarge text to make it more readable.
Using user-scalable=”no” in the <meta name=”viewport” element blocks people from resizing text, and ultimately from using your site.
A meta viewport element tells the browser how to scale and control the page's dimensions, but zoom can be disabled as a result of its use.
Don’t set custom attribute to user-scalable=”no”. Remove the user-scalable="no"parameter from the content attribute of the <meta name="viewport"> element if it’s been added element
Allow zoom without forcing horizontal scrolling
People with low vision use zoom to scale content, sometimes up to 400%. As they zoom, content should reflow vertically (as a column) and remain fully legible and logical without a need for horizontal scrolling.
The div that contains this paragraph has a width of 800px. This causes text to overflow horizontally at a 400% zoom.
The div that contains this paragraph has a width of 80%, so content reflows on zoom and does not overflow horizontally. Here are some considerations to keep in mind to make sure reflow doesn’t force horizontal scroll. Use relative units (like percentages and viewport width) to set width on text and images Check all breakpoints to make sure content doesn’t reflow horizontall. "Supporting the reflow of content is also known as 'Responsive Web Design'. It is enabled by CSS media queries which reformat the web content for different viewport widths (at particular break points) in order to provide optimised layouts for mobile devices such as tablets or smartphones. Importantly, these breakpoints are not only triggered by narrower viewports, but also when users employ the browser zoom function to zoom into the page."
Clearly-defined links
Your links should be meaningful and actionable. Screen readers can give visitors an overview of links on a page. When link text is read out of context, it should tell readers: What the link is, where the link is taking them.
Do
Embed links in clear, specific language that tells people where the link will take them and why they might want to go there. Indicate if a link will open high-bandwidth media like a PDF or video within the linked text
Don't
Embed links in generic terms like “more,” “this page,” or “click here”Link to raw URLs.