Type Scale
Modular typographic scale with ratio presets, fluid clamp() mode, line-height tokens, and live preview.
Scale
Preview
CSS
:root {
--text-xs: 0.64rem;
--text-sm: 0.8rem;
--text-base: 1rem;
--text-lg: 1.25rem;
--text-xl: 1.563rem;
--text-2xl: 1.953rem;
--text-3xl: 2.441rem;
--text-4xl: 3.052rem;
--text-5xl: 3.815rem;
--leading-xs: 1.66;
--leading-sm: 1.63;
--leading-base: 1.6;
--leading-lg: 1.56;
--leading-xl: 1.51;
--leading-2xl: 1.45;
--leading-3xl: 1.37;
--leading-4xl: 1.27;
--leading-5xl: 1.15;
}Runs in this browser. Nothing is uploaded.
How to use Type Scale
Choose a Base size in pixels, select a musical or golden Ratio, and pick how many steps to generate above base.
Enable Fluid sizes (clamp) if you want steps above base to interpolate smoothly from 360px to 1280px viewports.
Preview with system stacks or a locally installed font name and copy the :root --text-* and --leading-* variables.
Frequently asked questions
How are rem values computed?
Every step divides its computed pixel size by 16px root and pairs with a decreasing --leading-* line-height token floored at 1.05.