Type Scale
Embed This Widget
Add the script tag and a data attribute to embed this widget.
Embed via iframe for maximum compatibility.
<iframe src="https://fontfyi.com/iframe/glossary/type-scale/" width="420" height="400" frameborder="0" style="border:0;border-radius:10px;max-width:100%" loading="lazy"></iframe>
Paste this URL in WordPress, Medium, or any oEmbed-compatible platform.
https://fontfyi.com/glossary/type-scale/
Add a dynamic SVG badge to your README or docs.
[](https://fontfyi.com/glossary/type-scale/)
Use the native HTML custom element.
A harmonious progression of font sizes based on a ratio (e.g., 1.25, 1.333, 1.5). Creates visual hierarchy and consistency.
A type scale is a curated set of font sizes derived from a mathematical ratio, creating visual harmony across all text elements in a design system. Rather than choosing arbitrary sizes (14px, 18px, 24px, 36px), a type scale generates sizes that feel proportionally related — because they are.
The major third scale (ratio: 1.25) is a reliable starting point for UI:
| Step | Multiplier | Size (base 16px) |
|---|---|---|
| xs | 0.64× | ~10px |
| sm | 0.8× | ~13px |
| base | 1× | 16px |
| lg | 1.25× | 20px |
| xl | 1.563× | 25px |
| 2xl | 1.953× | 31px |
| 3xl | 2.441× | 39px |
| 4xl | 3.052× | 49px |
Implementing a type scale in CSS custom properties:
:root {
--ratio: 1.25;
--text-xs: calc(var(--text-sm) / var(--ratio));
--text-sm: calc(var(--text-base) / var(--ratio));
--text-base: 1rem;
--text-lg: calc(var(--text-base) * var(--ratio));
--text-xl: calc(var(--text-lg) * var(--ratio));
--text-2xl: calc(var(--text-xl) * var(--ratio));
--text-3xl: calc(var(--text-2xl) * var(--ratio));
--text-4xl: calc(var(--text-3xl) * var(--ratio));
}
h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
p { font-size: var(--text-base); }
Common ratios and their character:
- Minor second (1.067): Subtle scale, works for dense UI where size differences should be understated
- Major second (1.125): Conservative but clear, good for technical documentation
- Minor third (1.2): Versatile, widely used in design systems
- Major third (1.25): Clear hierarchy, recommended for general-purpose UI
- Perfect fourth (1.333): Assertive hierarchy, works well for editorial and marketing sites
- Golden ratio (1.618): Dramatic contrast, suits expressive display contexts
Tailwind CSS uses a hand-tuned scale (not a pure ratio) because strict mathematical scales sometimes produce awkward values. This is valid — the ratio is a starting point and constraint, not a rule you can't break.
For choosing a ratio, consider the range of text sizes in your design. If you have many heading levels, a smaller ratio like 1.2 keeps them from growing too large. If you only have two or three levels, a larger ratio like 1.333 creates the contrast needed to distinguish them clearly.
Tools like Type Scale and Utopia let you preview and export type scales interactively, including fluid scales that interpolate between two different ratios across viewport sizes.
相关术语
相关工具
展示此概念的字体
了解更多
SaaS 产品需要能建立信任、在密集 UI 中确保可读性并跨平台适配的排版。SaaS 排版完全指南。
设计系统分析 Apple HIG、Material Design、IBM Carbon、Shopify Polaris 等如何处理排版——字体选择、字号体系与规范。
设计系统跨断点的排版缩放——响应式字号体系、使用 clamp() 的流式字号,以及从移动端到桌面端维持层次结构。
设计系统设计令牌连接设计与开发——将字体家族、字号、字重、行高和间距作为结构化、跨平台的取值。