modular scale

A set of font sizes made by repeatedly multiplying a base size by one ratio, such as 16px × 1.25 for each step up.

In more detail

Ratios are often named after musical intervals: Major Third is 1.25 and Perfect Fourth is 1.333. Because every size relates to the others by the same ratio, headings and body text look balanced. The sizes are then published as typography tokens.

Example

modular(16, 1.25, 3) gives 31.3px, three Major Third steps above 16px.

Related terms

Taught in

References