Typography sizing updates!
We've updated typography sizing variables and class names to separate semantics from presentation. Read about how you can update.
The design system doesn't style base HTML typography elements (like
p, etc) unless they're inside an element with the ds-content class. Instead, it provides heading classes (available on this page) corresponding to visual sizes. These classes can be applied to any heading elements, irrespective of their semantic heading level (
h6). This approach allows teams to first choose the semantic heading level that make the most sense for the document and its accessibility and then choose a visual heading size class that fits the page's visual hierarchy.
First and last children
The design system heading styles have alternate margins for headings that are the first or last child of their parent element. Headings that are the first child have no top margin, and headings that are last children have no bottom margin. Some examples of what we mean:
<main> <h1>I'm the first child of my parent.</h1> <h2>I'm not the first child of my parent</h2> <div> <h2>I'm actually the first child of my parent even though I'm not the first heading on the page</h2> <h2>I'm the last child of my parent</h2> </div> <h2>I'm also the last child of my parent</h2> </main>
For pages that are mainly about written content or places where you want to use a standard mapping of heading-level styles to semantic heading levels, consider using the
ds-text-heading-3xl classes are responsive by default.
|Font class||545px and below||545px to 768px||768px and above|
To apply responsive typography elsewhere, use the font size utility class.
Since the base typography margins and line height is measured in
they'll automatically adjust as you change the font size.
The following CSS variables can be overridden to change the type sizes:
On this page