Typography

Typography

dragoon0x ec4845a 2 files · 1.2 KB Updated

File contents

/typography

Generates a 9-step type scale (xs / sm / base / md / lg / xl / 2xl / 3xl / 4xl) anchored on 16px, using the ratio detected by /scan (or a sensible default if none was found).

When to use

  • The user wants to formalize their typography system
  • The user asks for a "type scale", "font tokens", or "type tokens"
  • After /scan detects a type ratio, to extract it as reusable tokens

Output

One file per run. Format chosen automatically from the stack, override with --format:

  • css:root { --font-size-xs: ... }
  • tailwindmodule.exports = { theme: { extend: { fontSize: { ... } } } }
  • jsexport const fontSize = { xs: '...', ... }

Default dir: src/styles/. Override with --dir.

Run it

dragoon typography                           # preview
dragoon typography --apply                   # write
dragoon typography --format js --apply
dragoon typography --dir src/tokens --apply

Dragoon0x/dragoon-skills/tree/main/skills/typography commit ec4845aea4

Frequently asked questions

npx skillmds@latest add dragoon0x/typography