Generate Type Scale
generate_type_scaleGenerate a modular typographic scale from a base size and ratio, giving named steps, line-heights, letter-spacing, and fluid clamp(). Provides CSS custom properties and Tailwind v4 @theme block.
Instructions
Generate a modular typographic scale from a base size and ratio: named steps (xs…6xl) with sizes, line-heights, letter-spacing, and optional fluid clamp() that scales display type down on small screens. Emits CSS custom properties and a Tailwind v4 @theme block. Deterministic real output. Pair with suggest_font_pairing and generate_design_tokens.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | No | Base body size in px (default 16) | |
| fluid | No | Emit fluid clamp() for headings (default true) | |
| ratio | No | Modular ratio (default 1.25). Common: 1.2 minor-third, 1.25 major-third, 1.333 perfect-fourth, 1.5, 1.618 golden | |
| steps | No | Named steps above base (default 7 → up to 6xl) |