Typography
Good use of typography makes it easier for customers to interact with a digital experience.
Our typography principles
Characterful
Each brand has a unique font that forms a key part of its visual identity.Flexible
Our system does not set certain sizes or weights for specific headers. Sizes can be chosen for any semantic heading according to what works best for the design.Responsive
Our typography automatically scales up and down to respond to different viewport sizes.Our type system
Each brand that uses our type system has its own individual font. But they are all applied to our type system, which maps the font to a hierarchy from smallest (‘caption’) to largest (‘Display 6’) with a consistent line height.
Responsive behaviour
In line with mobile first principles, the table below shows how type appears on smaller screens. Each display option has a responsive alternative, which is the size it will adopt on screens larger than 720px.
Whilst these styles are responsive by default, you can prevent this behaviour if needed.
Name | Style | Font size | Line height | Responsive alternative for screens larger than 720px |
Display 6 | Mary Ann Extra Bold | 3.75rem | 1.267 | |
Display 5 | Mary Ann Extra Bold | 3rem | 1.292 | display 6 |
Display 4 | Mary Ann Extra Bold | 2.375rem | 1.316 | display 5 |
Display 3 | Mary Ann Extra Bold | 1.875rem | 1.333 | display 4 |
Display 2 | Mary Ann Extra Bold | 1.5rem | 1.333 | display 3 |
Display 1 | Mary Ann Extra Bold | 1.25rem | 1.3 | display 2 |
Label 2 | Mary Ann Extra Bold | 1.125rem | 1.5 | |
Label 1 | Arial Bold | 1rem | 1.5 | |
Body 2 | Arial Bold | 1.125rem | 1.444 | |
Body 1 | Arial Regular | 1rem | 1.5 | |
Caption | 0.875rem | 1.571 |
Our native type stack
You can use our native type stack in our Sainsbury's, Argos and Nectar brand libraries. At the moment, this is a basic type stack that reduces the need for surplus fonts, but we'll be weaving in more system capabilities over time.
If you're working on native products, you should be using the brand fonts for Label 2 to Display 6 and the native system fonts for everything else (Caption to Label 1).
Name | Style | Font size | Line height | Responsive alternative for screens larger than 720px |
Display 6 | Mary Ann Extra Bold | 3.75rem | 1.267 | |
Display 5 | Mary Ann Extra Bold | 3rem | 1.292 | display 6 |
Display 4 | Mary Ann Extra Bold | 2.375rem | 1.316 | display 5 |
Display 3 | Mary Ann Extra Bold | 1.875rem | 1.333 | display 4 |
Display 2 | Mary Ann Extra Bold | 1.5rem | 1.333 | display 3 |
Display 1 | Mary Ann Extra Bold | 1.25rem | 1.3 | display 2 |
Label 2 | Mary Ann Extra Bold | 1.125rem | 1.5 | |
Label 1 | SF Pro Bold (iOS)Roboto Bold (Android) | 1rem | 1.5 | |
Body 2 | SF Pro Regular (iOS)Roboto Regular (Android) | 1.125rem | 1.444 | |
Body 1 | SF Pro Regular (iOS)Roboto Regular (Android) | 1rem | 1.5 | |
Caption | 0.875rem | 1.571 |
Accessing our fonts
Display sizes in action
Below we’ve set out some sensible starting points for when to use different display sizes. You’ll see that the largest size suggested is Display 5.
But remember that these are recommendations. There may be times when there’s a case to use different display sizes for headings, including Display 6 or 7. You’re free to do so according to the needs of your design and your users.
Suggested mapping of display sizes to headers
The table below shows how the type scale can be mapped to common HTML elements. There’s an alternative ‘small’ size mapping which may work better for more information dense screens (for example, some colleague applications).
Element | Suggested default display size | Alternative small display size |
<h1> | Display 5 | Display 4 |
<h2> | Display 4 | Display 3 |
<h3> | Display 3 | Display 2 |
<h4> | Display 2 | Display 1 |
<h5> | Display 1 | |
<body> | Body 1 |
Tips for engineers implementing type
Using HTML
Writing scalable CSS for a component using Tailwind involves using its utility classes, creating reusable components, using @apply to create custom classes, customizing Tailwind's configuration, and using responsive design.
When building out HTML there is a utility class for each of the type options. You can use the ds-u-[insert display here]
classname to apply the typography styles to a custom component, which will include the font family, font size, font weight, and line height.
For example, making use of .ds-u-display-1
will apply MaryAnn ExtraBold and the relevant font sizing to the element. In React you can similarly use the ≤Display1≥ component to apply this styling to its children.
Controlling the responsive style variant
If you want to prevent text from scaling when using the React components you can apply the ‘sFixed’ prop (<Display1 isFixed/>
) to achieve this.