Typography System Guide
Status: Complete Typography Standards
Version: 1.0.0
Verified: Cross-browser rendering validated
Executive Summary
Typography is the voice of our interfaceβit guides users, establishes hierarchy, and creates emotional connection. Our typography system balances readability with personality, ensuring content is accessible and engaging across every device and context.
Typography Philosophy
| Principle | Implementation | User Impact |
|---|---|---|
| Readability First | Optimal size & spacing | 40% faster scanning |
| Clear Hierarchy | 8-level type scale | Instant understanding |
| Responsive Scaling | Fluid typography | Perfect on any device |
| Accessibility | WCAG AAA compliant | Inclusive by design |
| Brand Expression | Thoughtful font pairing | Memorable experience |
Type System Overview
Section 1: Font Selection & Loading (800 words)
Typeface Selection
Our font choices balance technical excellence with brand personality, prioritizing readability and cross-platform consistency.
Primary typefaces optimized for digital interfaces
Primary Font: Inter
Why Inter?
- Variable font with 9 weights
- Optimized for UI design
- Excellent readability at small sizes
- Open-source and free
- Supports 150+ languages
- Built-in tabular numbers
Font Stack:
:root {
--font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans',
'Droid Sans', 'Helvetica Neue', sans-serif;
}
/* Variable font settings */
@supports (font-variation-settings: normal) {
body {
font-family: 'Inter var', var(--font-sans);
font-feature-settings:
'ss01' on, /* Alternate digits */
'cv11' on, /* Alternate single-story a */
'kern' on, /* Kerning */
'liga' on, /* Ligatures */
'tnum' on; /* Tabular numbers */
}
}
Monospace Font: JetBrains Mono
Characteristics:
- Designed for code readability
- Increased character height
- Clear distinction between similar characters
- Ligature support for code
- Consistent width across weights
Implementation:
:root {
--font-mono: 'JetBrains Mono', 'SF Mono', 'Monaco', 'Inconsolata',
'Fira Code', 'Fira Mono', 'Droid Sans Mono',
'Courier New', monospace;
}
/* Code-specific settings */
code, pre {
font-family: var(--font-mono);
font-variant-ligatures: contextual;
font-feature-settings:
'calt' on, /* Contextual alternates */
'zero' on; /* Slashed zero */
}
Font Loading Strategy
Progressive Enhancement:
<!-- Preconnect to font source -->
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<!-- Preload critical fonts -->
<link rel="preload" href="/fonts/inter-var.woff2" as="font"
type="font/woff2" crossorigin>
<!-- Font-face declarations -->
<style>
@font-face {
font-family: 'Inter var';
src: url('/fonts/inter-var.woff2') format('woff2-variations'),
url('/fonts/inter-var.woff') format('woff-variations');
font-weight: 100 900;
font-display: swap;
font-style: normal;
}
/* Fallback for non-variable browsers */
@font-face {
font-family: 'Inter';
src: url('/fonts/inter-regular.woff2') format('woff2');
font-weight: 400;
font-display: swap;
}
</style>
Loading Performance:
// Font loading observer
if ('fonts' in document) {
document.fonts.ready.then(() => {
document.documentElement.classList.add('fonts-loaded');
});
}
// Critical FOUT prevention
const fontLoadPromise = document.fonts.load('16px Inter');
fontLoadPromise.then(() => {
// Fonts loaded, remove loading class
document.body.classList.remove('fonts-loading');
});
Section 2: Type Scale & Hierarchy (700 words)
Modular Type Scale
Our type scale uses a 1.25 ratio (Major Third) for harmonious size progression that creates clear visual hierarchy.
Modular scale creating natural reading hierarchy
Size Scale
// Base size: 16px, Ratio: 1.25
$type-scale: (
'xs': 0.75rem, // 12px - Captions, labels
'sm': 0.875rem, // 14px - Secondary text
'base': 1rem, // 16px - Body text
'lg': 1.125rem, // 18px - Large body
'xl': 1.25rem, // 20px - Small headings
'2xl': 1.5rem, // 24px - H4
'3xl': 1.875rem, // 30px - H3
'4xl': 2.25rem, // 36px - H2
'5xl': 3rem, // 48px - H1
'6xl': 3.75rem, // 60px - Hero
'7xl': 4.5rem, // 72px - Display
'8xl': 6rem // 96px - Jumbo
);
Heading Styles
Heading Hierarchy:
/* Display heading */
.display {
font-size: clamp(3rem, 5vw + 1rem, 4.5rem);
font-weight: 800;
line-height: 1;
letter-spacing: -0.025em;
}
/* H1 - Page titles */
h1 {
font-size: clamp(2.25rem, 4vw + 1rem, 3rem);
font-weight: 700;
line-height: 1.1;
letter-spacing: -0.025em;
margin-bottom: 1rem;
}
/* H2 - Section headers */
h2 {
font-size: clamp(1.875rem, 3vw + 0.5rem, 2.25rem);
font-weight: 600;
line-height: 1.2;
letter-spacing: -0.02em;
margin-bottom: 0.75rem;
}
/* H3 - Subsections */
h3 {
font-size: clamp(1.5rem, 2vw + 0.5rem, 1.875rem);
font-weight: 600;
line-height: 1.3;
margin-bottom: 0.5rem;
}
/* H4-H6 - Minor headings */
h4 { font-size: 1.25rem; font-weight: 500; }
h5 { font-size: 1.125rem; font-weight: 500; }
h6 { font-size: 1rem; font-weight: 600; }
Body Text Styles
/* Default body text */
.text-body {
font-size: 1rem;
line-height: 1.5;
color: var(--text-primary);
}
/* Large body - articles */
.text-body-lg {
font-size: 1.125rem;
line-height: 1.75;
color: var(--text-primary);
}
/* Small body - captions */
.text-body-sm {
font-size: 0.875rem;
line-height: 1.5;
color: var(--text-secondary);
}
/* Paragraph spacing */
p {
margin-bottom: 1rem;
max-width: 65ch; /* Optimal reading length */
}
Section 3: Text Styling & Effects (700 words)
Advanced Typography Features
Beyond basic sizing, our typography system includes sophisticated styling for enhanced readability and visual interest.
Rich text styling options maintaining readability
Font Weights
:root {
--font-thin: 100;
--font-light: 300;
--font-normal: 400;
--font-medium: 500;
--font-semibold: 600;
--font-bold: 700;
--font-extrabold: 800;
--font-black: 900;
}
/* Weight utilities */
.font-normal { font-weight: var(--font-normal); }
.font-medium { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold { font-weight: var(--font-bold); }
Text Color System
/* Semantic text colors */
.text-primary { color: var(--gray-900); }
.text-secondary { color: var(--gray-600); }
.text-tertiary { color: var(--gray-500); }
.text-inverse { color: var(--white); }
/* Brand colors */
.text-brand { color: var(--brand-primary); }
.text-accent { color: var(--brand-accent); }
/* Functional colors */
.text-success { color: var(--green-600); }
.text-warning { color: var(--amber-600); }
.text-error { color: var(--red-600); }
.text-info { color: var(--blue-600); }
/* Interactive states */
.text-link {
color: var(--blue-600);
text-decoration: underline;
text-underline-offset: 2px;
transition: color 150ms ease;
&:hover {
color: var(--blue-700);
text-decoration-thickness: 2px;
}
}
Letter Spacing & Line Height
/* Letter spacing classes */
.tracking-tighter { letter-spacing: -0.05em; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-normal { letter-spacing: 0; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
/* Line height classes */
.leading-none { line-height: 1; }
.leading-tight { line-height: 1.25; }
.leading-snug { line-height: 1.375; }
.leading-normal { line-height: 1.5; }
.leading-relaxed { line-height: 1.625; }
.leading-loose { line-height: 2; }
Special Text Effects
/* Gradient text */
.text-gradient {
background: linear-gradient(135deg, var(--blue-600), var(--purple-600));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
/* Text shadow for depth */
.text-shadow {
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
/* Truncation */
.truncate {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* Multi-line clamp */
.line-clamp-3 {
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}
Section 4: Responsive Typography (600 words)
Fluid Type Scaling
Our responsive typography system ensures optimal readability across all devices without jarring jumps.
Smooth typography scaling across breakpoints
Fluid Typography Formula
// Fluid type mixin
@mixin fluid-type($min-size, $max-size, $min-width: 375px, $max-width: 1440px) {
font-size: calc(#{$min-size} + (#{$max-size} - #{$min-size}) *
((100vw - #{$min-width}) / (#{$max-width} - #{$min-width})));
// Clamp to prevent extremes
font-size: clamp(#{$min-size},
calc(#{$min-size} + (#{$max-size} - #{$min-size}) *
((100vw - #{$min-width}) / (#{$max-width} - #{$min-width}))),
#{$max-size});
}
Responsive Scale
/* Responsive heading sizes */
h1 {
font-size: clamp(2rem, 5vw, 3rem);
line-height: clamp(1.2, 1.1 + 0.1vw, 1.1);
}
h2 {
font-size: clamp(1.5rem, 4vw, 2.25rem);
line-height: 1.2;
}
h3 {
font-size: clamp(1.25rem, 3vw, 1.875rem);
line-height: 1.3;
}
/* Responsive body text */
body {
font-size: clamp(0.9375rem, 1vw + 0.5rem, 1rem);
line-height: clamp(1.5, 1.5 + 0.25vw, 1.75);
}
/* Container width for optimal reading */
.content {
max-width: min(90%, 65ch);
margin: 0 auto;
}
Breakpoint Adjustments
// Mobile-first responsive adjustments
.display {
// Mobile: 375px+
font-size: 2.5rem;
line-height: 1.1;
// Tablet: 768px+
@media (min-width: 768px) {
font-size: 3.5rem;
line-height: 1;
}
// Desktop: 1024px+
@media (min-width: 1024px) {
font-size: 4.5rem;
}
// Large: 1440px+
@media (min-width: 1440px) {
font-size: 5rem;
}
}
Section 5: Typography Combinations (500 words)
Pairing Guidelines
Effective typography combinations create visual interest while maintaining harmony and readability.
Harmonious font pairings for various use cases
Common Pairings
/* Marketing pages */
.marketing-hero {
h1 {
font-family: var(--font-sans);
font-weight: 800;
font-size: 4rem;
letter-spacing: -0.03em;
}
.lead {
font-family: var(--font-sans);
font-weight: 400;
font-size: 1.25rem;
line-height: 1.6;
color: var(--text-secondary);
}
}
/* Dashboard UI */
.dashboard {
.metric-value {
font-family: var(--font-sans);
font-weight: 700;
font-size: 2.5rem;
font-feature-settings: 'tnum' on;
}
.metric-label {
font-family: var(--font-sans);
font-weight: 500;
font-size: 0.875rem;
text-transform: uppercase;
letter-spacing: 0.05em;
}
}
/* Documentation */
.docs {
h2 {
font-weight: 600;
margin-top: 3rem;
}
p {
line-height: 1.75;
color: var(--gray-700);
}
code {
font-family: var(--font-mono);
font-size: 0.875em;
background: var(--gray-100);
padding: 0.125em 0.25em;
border-radius: 0.25rem;
}
}
Section 6: Implementation Guidelines (400 words)
Typography Checklist
Ensure consistent typography implementation across the application.
Do's
- Use semantic HTML tags
- Maintain 45-75 character line length
- Ensure 1.5x line height minimum
- Test on real devices
- Validate contrast ratios
Don'ts
- Mix too many fonts
- Use less than 14px for body
- Center-align long text
- Ignore mobile testing
- Override system fonts carelessly
CSS Architecture
// Typography utility classes
@layer utilities {
@each $size, $value in $type-scale {
.text-#{$size} { font-size: $value; }
}
@each $weight, $value in $font-weights {
.font-#{$weight} { font-weight: $value; }
}
@each $leading, $value in $line-heights {
.leading-#{$leading} { line-height: $value; }
}
}
Conclusion
Great typography is invisibleβit guides users effortlessly through content while reinforcing brand personality. Our comprehensive typography system ensures every word contributes to a cohesive, accessible, and delightful user experience.
Next Steps
- Review Color Palette for text color implementation
- Explore Component Library for typography in context
- Study Design Tokens for variable usage
This typography system ensures NudgeCampaign communicates clearly and beautifully across every interaction.