Typography
Rosetta Stone: Text Size, Fonts & Weights
When styling text, use the HTML Utility Class directly in markup (class="text-sm text-muted") or the CSS Token inside a scoped <style> block (font-size: var(--scale-d2)). Both read from the exact same optical scale.
1. Type Scale (Size)
| Intention / Role | HTML Utility Class | CSS Token (var(...)) |
Optical Formula |
|---|---|---|---|
| Micro badge / KBD | .text-3xs / .text-scale-d5 |
var(--scale-d5) |
font-size * ratio^-4 (min 9px) |
| Legal / Fine caption | .text-2xs / .text-scale-d4 |
var(--scale-d4) |
font-size * ratio^-3 (min 9px) |
| Metadata / Timestamp / Tag | .text-xs / .text-scale-d3 |
var(--scale-d3) |
font-size * ratio^-2 |
| Secondary UI / Description | .text-sm / .text-scale-d2 |
var(--scale-d2) |
font-size * ratio^-1 |
| Body text (default) | .text-base / .text-scale |
var(--scale) |
var(--font-size) (1rem base) |
| Lead paragraph / H4 | .text-lg / .text-scale-2 |
var(--scale-2) |
font-size * ratio^1 |
| Card title / H3 | .text-xl / .text-scale-3 |
var(--scale-3) |
font-size * ratio^2 |
| Section heading / H2 | .text-2xl / .text-scale-4 |
var(--scale-4) |
font-size * ratio^3 |
| Page title / H1 | .text-3xl / .text-scale-5 |
var(--scale-5) |
font-size * ratio^4 |
| Hero display | .text-4xl .. .text-6xl |
var(--scale-6) .. var(--scale-8) |
font-size * ratio^5..7 (max 96px) |
2. Font Families, Weights & Line Heights
| Intention | HTML Utility Class | CSS Token (var(...)) |
|---|---|---|
| Body font (semantic role) | .font-text |
var(--font-text) |
| Sans-serif stack | .font-sans |
var(--font-sans) |
| Serif editorial stack | .font-serif |
var(--font-serif) |
| Monospace code/data stack | .font-monospace |
var(--font-monospace) |
| Regular weight (400) | .font-normal |
var(--font-weight) |
| Bold emphasis | .font-bold |
var(--font-weight-bold) |
| Light weight (300) | .font-light |
300 |
| Compact line height | .leading-compact |
var(--line-height-compact) |
| Relaxed line height | .leading-relaxed |
var(--line-height-relaxed) |
Typography System
Typography
Fine-art typography system using variable fonts, OpenType features, and mathematical scaling. Implements classical typography rules with modern web capabilities. Supports multiple font families, optical sizing, and locale-specific rules.
| Name | Description | Value |
|---|---|---|
Aa--font-sans |
Sans-serif font stack ("Inter", "Instrument Sans Variable", system-ui, -apple-system, sans-serif). |
"Inter", "Instrument Sans Variable", system-ui, -apple-system, sans-serif |
Aa--font-serif |
Serif font stack ("Source Serif 4", "Newsreader", "Instrument Serif", serif). |
"Source Serif 4", "Newsreader", "Instrument Serif", serif |
Aa--font-monospace |
Monospace font stack ("IBM Plex Mono", ui-monospace, monospace). |
"IBM Plex Mono", ui-monospace, monospace |
Aa--font-text |
Semantic body font family (defaults to --font-sans). |
var(--font-sans) |
Aa--font-header |
Semantic heading font family (defaults to "Inter"). |
"Inter" |
Aa--font-interface |
Semantic UI font family (defaults to --font-sans). |
var(--font-sans) |
--font-inter-feature |
OpenType stylistic feature set for Inter font. | "calt", "cv05", "cv11", "ss03" |
--font-instrument-feature |
OpenType stylistic feature set for Instrument Sans. | "figa", "ss01", "ss02", "ss05" |
Aa--font-weight |
Normal text font weight (400). |
400 |
Aa--font-weight-bold |
Bold text font weight (600). |
600 |
Aa--font-weight-medium |
A step above regular: 500. Interface labels, table figures. |
500 |
Aa--font-weight-semibold |
600: the usual emphasis weight (the default of --font-weight-bold, which a theme may change; this one never moves). |
600 |
Aa--font-weight-strong |
700: strong emphasis, figures that carry a card, small titles. |
700 |
Aa--font-weight-heavy |
800: the heaviest weight in use, for a few large numerals. |
800 |
Aa--font-weight-header |
Heading font weight anchor: 700, or the --font-header-weight hook when a theme sets it. |
var(--font-header-weight, 700) |
Aa--font-weight-h1 |
Level 1 heading weight. | var(--font-weight-header) |
Aa--font-weight-h2 |
Level 2 heading weight. | max( calc(var(--font-weight-header) * 0.85), var(--font-weight) ) |
Aa--font-weight-h3 |
Level 3 heading weight. | max( calc(var(--font-weight-header) * 0.85), var(--font-weight) ) |
Aa--font-weight-h4 |
Level 4 heading weight. | var(--font-weight) |
Aa--font-weight-h5 |
Level 5 heading weight. | var(--font-weight) |
Aa--font-weight-h6 |
Level 6 heading weight. | var(--font-weight) |
--font-letter-spacing |
Body letter spacing default (normal). |
normal |
--font-header-letter-spacing |
Heading letter spacing default (normal). |
normal |
--list-indent |
Default list item indentation (var(--space)). |
var(--space) |
--font-feature |
Default OpenType feature settings for body text. | "" |
--font-variation |
Default variable-font axes for body text. | "wdth" 95 |
--font-header-feature |
OpenType feature settings for headings. | "" |
--font-header-variation |
Variable-font axes for headings. | "" |
--font-monospace-feature |
OpenType feature settings for monospace text. | "" |
--font-monospace-variation |
Variable-font axes for monospace text. | "" |
--font-interface-feature |
OpenType feature settings for interface text. | "dlig", "zero" |
--font-interface-variation |
Variable-font axes for interface text. | "" |
--font-list-feature |
OpenType feature settings for lists (tabular numbers, slashed zero…). | "dlig", "tnum", "zero" |
--font-list-variation |
Variable-font axes for lists. | "" |
--target-lh |
Line height used to snap headings to the baseline grid (see grid-line-height). |
calc(1em * var(--font-header-line-height, #{$tightness})) |
Headings, the type scale and the weights
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
<p>Body text in <code>--font-text</code>, set on the baseline grid so every line lands on the rhythm.</p>
Live
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Body text in --font-text, set on the baseline grid so every line lands on the rhythm.
The three font roles
<p style="font-family: var(--font-sans)">Sans: the default, <code>--font-sans</code>.</p>
<p style="font-family: var(--font-serif)">Serif: for long reading, <code>--font-serif</code>.</p>
<p style="font-family: var(--font-monospace)">Monospace: for code and data, <code>--font-monospace</code>.</p>
<p style="font-family: var(--font-interface)">Interface: for controls and labels, <code>--font-interface</code>.</p>
Live
Sans: the default, --font-sans.
Serif: for long reading, --font-serif.
Monospace: for code and data, --font-monospace.
Interface: for controls and labels, --font-interface.
Typography Elements & Patterns
Typography
Headings, inline styling, small-caps overlines, keycaps, marks, and blockquotes.
| Name | Description |
|---|---|
.overline |
Small-caps letterspaced kicker label with top border rule. |
.bold |
Strong bold text weight utility. |
.menu |
UI interface font role application. |
.ui |
UI interface font role application. |
.interface |
UI interface font role application. |
.font-interface |
Explicit interface font family utility. |
.font-mono |
Monospace font family utility. |
mark |
Highlight mark element with optical trim padding and theme tinting. |
kbd |
Keyboard keycap with raised shadow and monospace font. |
a:hover |
Color and underline accent transition for hyperlinks. |
.prose |
p a[target=“_blank”] External link in prose paragraphs with automatic arrow indicator (↗). |
a.internal-link |
A target="_blank" link that is on the same site: it opts out of the external arrow. |
Inline text elements
<p>
Some <strong>strong</strong>, <em>emphasised</em> and <mark>marked</mark> text,
<code>inline code</code>, a <kbd>⌘</kbd> <kbd>K</kbd> shortcut, <small>small print</small>,
H<sub>2</sub>O and x<sup>2</sup>, an <abbr title="Cascading Style Sheets">CSS</abbr> abbreviation,
and <del>deleted</del> or <ins>inserted</ins> text.
</p>
Live
Some strong, emphasised and marked text,
inline code, a ⌘ K shortcut, small print,
H2O and x2, an CSS abbreviation,
and deleted or inserted text.
Links, internal and external
<p>
An <a href="#">internal link</a> and an
<a href="https://stnd.build" target="_blank" rel="noopener">external link</a>
that gets its arrow automatically.
</p>
Live
An internal link and an external link that gets its arrow automatically.
Overline, weight and font utilities
<p class="overline">An overline kicker</p>
<p class="bold">Bold weight on a whole line</p>
<p class="font-mono">Monospace on a whole line</p>
<p class="font-interface">Interface font on a whole line</p>
<p class="ui">The ui, menu and interface classes apply the interface role to a block.</p>
Live
An overline kicker
Bold weight on a whole line
Monospace on a whole line
Interface font on a whole line
The ui, menu and interface classes apply the interface role to a block.
Heading Rhythm & Grid Snapping
Typography
Half-baseline rhythm snapping mixin for heading hierarchy.
| Name | Description |
|---|---|
@mixin |
grid-line-height Heading line-height mixin snapping leading to half-baseline rhythm increments. |
All classes
Core element styling
| Class | Declares |
|---|---|
.overline |
font-variant-caps: small-caps |
Interface and code
| Class | Declares |
|---|---|
.menu, .ui, .interface, .font-interface |
font-family: var(--font-interface), system-ui, sans-serif |
Utility classes
Extracted live from
_standard-50-utilities.scss. Every utility below maps directly to the semantic tokens above.
Typography: Size
The optical type scale as classes, .text-xs to .text-6xl; each is also reachable as .text-scale-*. They read the --scale-* tokens (Optical harmony scale).
| Class | Declares |
|---|---|
Aa.text-3xs, .text-scale-d5 |
font-size: var(--scale-d5) !important |
Aa.text-2xs, .text-scale-d4 |
font-size: var(--scale-d4) !important |
Aa.text-xs, .text-scale-d3 |
font-size: var(--scale-d3) !important |
Aa.text-sm, .text-scale-d2 |
font-size: var(--scale-d2) !important |
Aa.text-base, .text-scale |
font-size: var(--scale) !important |
Aa.text-lg, .text-scale-2 |
font-size: var(--scale-2) !important |
Aa.text-xl, .text-scale-3 |
font-size: var(--scale-3) !important |
Aa.text-2xl, .text-scale-4 |
font-size: var(--scale-4) !important |
Aa.text-3xl, .text-scale-5 |
font-size: var(--scale-5) !important |
Aa.text-4xl, .text-scale-6 |
font-size: var(--scale-6) !important |
Aa.text-5xl, .text-scale-7 |
font-size: var(--scale-7) !important |
Aa.text-6xl, .text-scale-8 |
font-size: var(--scale-8) !important |
Typography: Weight
Font weights, from the --font-weight-* tokens (Typography).
| Class | Declares |
|---|---|
Aa.font-bold |
font-weight: var(--font-weight-bold) !important |
Aa.font-header |
font-family: var(--font-header) !important |
Aa.font-normal |
font-weight: var(--font-weight) !important |
Aa.font-light |
font-weight: 300 !important |
Typography: Line height
Compact and relaxed line heights (--line-height-compact, --line-height-relaxed).
| Class | Declares |
|---|---|
.compact |
line-height: var(--line-height-compact) !important |
.relaxed |
line-height: var(--line-height-relaxed) !important |
Typography: Alignment
Text alignment.
| Class | Declares |
|---|---|
.text-left |
text-align: left !important |
.text-center |
text-align: center !important |
.text-right |
text-align: right !important |
.text-justify |
text-align: justify !important |
Typography: Transform
Case transforms.
| Class | Declares |
|---|---|
Aa.uppercase |
text-transform: uppercase !important |
Aa.lowercase |
text-transform: lowercase !important |
Aa.capitalize |
text-transform: capitalize !important |
Aa.text-transform-none |
text-transform: none !important |
Typography: Wrapping and overflow
Wrapping, text-box trim (optical alignment to the baseline grid) and truncation.
| Class | Declares |
|---|---|
.no-wrap |
white-space: nowrap !important |
.no-trim, .trim-none |
text-box-trim: none !important |
.trim-baseline |
text-box-edge: cap alphabetic !important |
.trim-cap |
text-box-edge: cap text !important |
.ellipsis, .ellipsis li |
overflow: hidden |
Multi-column flow
CSS multi-column flow for long lists and text: column counts, gaps, rules, and keeping an item whole.
| Class | Declares |
|---|---|
.columns, .columns-2 |
columns: 2 |
.columns-3 |
columns: 3 |
.columns-4 |
columns: 4 |
.columns-auto |
columns: auto |
.columns-gap-compact |
column-gap: var(--leading) |
.columns-gap-wide |
column-gap: var(--space-2) |
.columns-keep |
break-inside: avoid |
.columns-rule |
column-rule: var(--border) |
.columns-rule-accent |
column-rule: 1px solid var(--color-accent) |
.columns-2, .columns-3, .columns-4 |
columns: 1 |
.columns-3, .columns-4 |
columns: 2 |