Skip to content

Typography

The full Figma type scale as SCSS maps and mixins. The module is CSS-free — it declares only tokens and mixins, so it’s safe to @use from any component stylesheet without emitting CSS. The Avenir @font-face declarations live in a separate typography-fonts entry that you load once, globally.

@use '@presencelearning/styles/typography' as t;
.heading {
@include t.h1;
}
.section {
@include t.h6;
}
.label {
@include t.overline;
} // adds text-transform: uppercase
.custom {
@include t.apply(t.$body-1);
}
.foo {
font-family: t.$font-family-base;
font-weight: t.$font-weight-bold;
}
The quick brown fox
h1 96px / 112px · 800 · -1.5px
The quick brown fox
h2 60px / 72px · 800 · -0.5px
The quick brown fox
h3 48px / 56px · 800 · 0
The quick brown fox
h4 34px / 36px · 800 · 0
The quick brown fox
h5 24px / 24px · 800 · 0.18px
The quick brown fox
h6 20px / 24px · 900 · 0.15px
The quick brown fox
subtitle-1 16px / 24px · 400 · 0.15px
The quick brown fox
subtitle-2 14px / 24px · 500 · 0.10px
The quick brown fox
body-1 14px / 20px · 400 · 0.25px
The quick brown fox
body-2 14px / 24px · 400 · 0.25px
The quick brown fox
button 14px / 16px · 800 · 0.25px
The quick brown fox
caption 12px / 16px · 400 · 0.40px
The quick brown fox
overline 10px / 16px · 500 · 1.50px

The Avenir @font-face declarations are a side effect — they emit CSS — so they live in their own entry, separate from the CSS-free typography tokens/mixins module. Load them once, globally (e.g. from your app’s top-level stylesheet), not from individual component stylesheets:

// Once, in a global stylesheet:
@use '@presencelearning/styles/typography-fonts';

A precompiled stylesheet is also available for consumers that prefer a plain CSS import:

@import '@presencelearning/styles/typography-fonts.css';

| Weight | File | Style | | ------ | ---------------------------------------- | ------------------- | | 400 | avenir-roman-400-webfont.{woff,woff2} | Regular | | 500 | avenir-medium-500-webfont.{woff,woff2} | Medium | | 800 | avenir-heavy-800-webfont.{woff,woff2} | Bold (Avenir Heavy) | | 900 | avenir-black-900-webfont.{woff,woff2} | Black |

The @font-face rules reference fonts via relative ./fonts/... URLs, which any modern bundler (Vite, webpack-sass-loader) resolves automatically when the entry is loaded globally. Direct file URLs are also available at @presencelearning/styles/fonts/....