Establishing clear text hierarchy
A typography system defines font families, size scales, line heights, and font weights. Using a modular scale creates visually rhythmic text hierarchy.
/* Base: 16px, Ratio: 1.25 (Major Third) */
--text-xs: 10px; /* 16 / 1.25 / 1.25 */
--text-sm: 13px; /* 16 / 1.25 */
--text-base: 16px; /* Base */
--text-lg: 20px; /* 16 * 1.25 */
--text-xl: 25px; /* 16 * 1.25 * 1.25 */
--text-2xl: 31px; /* 16 * 1.25^3 */
--text-3xl: 39px; /* 16 * 1.25^4 */Choose variable fonts with multiple weights to reduce requests while precisely controlling font weight.