Typography sizing updates!
We've updated typography sizing variables and class names to separate semantics from presentation. Read about how you can update.
Examples
Large body text
.ds-text-body--lg
Medium body text
.ds-text-body--md
Small body text
.ds-text-body--sm
Code
Style customization
The following CSS variables can be overridden to change the type sizes:
--font-size-lg
--font-size-md
, uses--font-size-base
--font-size-sm
Guidance
Accessibility
- If you need to stray from the default body text color and default page background color, make sure your color combinations provide sufficient color contrast:
- 4.5:1 minimum contrast ratio for text smaller than:
- 18pt (24px), normal font weight
- 14pt (18.6px), bold font weight
- 3:1 minimum contrast ratio for text equal to or larger than:
- 18pt (24px), normal font weight
- 14pt (18.6px), bold font weight
- For more information, check out the following resources:
- 4.5:1 minimum contrast ratio for text smaller than: