Loading...
Loading...
Apply professional typography principles to create readable, hierarchical, and aesthetically refined interfaces. Use when setting type scales, choosing fonts, adjusting spacing, designing text-heavy layouts, or when the user asks about readability, font pairing, line height, measure, or typographic hierarchy.
npx skill4agent add petekp/claude-code-setup typography## Type System
### Scale
- Base: [size, e.g., 16px]
- Ratio: [e.g., Minor Third 1.200]
- Rationale: [why this ratio]
### Hierarchy
| Level | Size | Weight | Line Height | Letter Spacing | Use |
|-------|------|--------|-------------|----------------|-----|
| Display | ... | ... | ... | ... | Hero, marketing |
| H1 | ... | ... | ... | ... | Page titles |
| H2 | ... | ... | ... | ... | Section heads |
| Body | ... | ... | ... | ... | Paragraphs |
| Small | ... | ... | ... | ... | Captions, labels |
### Fonts
- Primary: [font] - [rationale]
- Secondary: [font, if applicable]
- Mono: [font, if applicable]
### Implementation
```css
/* Ready-to-use CSS variables */
For typography audits:
```markdown
## Typography Audit
### Issues
| Element | Problem | Recommendation |
|---------|---------|----------------|
| ... | ... | ... |
### Quick Wins
- [Immediate improvement 1]
- [Immediate improvement 2]text-xs: 12px (0.75rem)
text-sm: 14px (0.875rem)
text-base: 16px (1rem)
text-lg: 18px (1.125rem)
text-xl: 20px (1.25rem)
text-2xl: 24px (1.5rem)
text-3xl: 30px (1.875rem)
text-4xl: 36px (2.25rem)
text-5xl: 48px (3rem)/* Tailwind equivalents */
max-w-prose /* ~65ch */
max-w-2xl /* 672px, good for articles */
max-w-xl /* 576px, compact content */tracking-tighter: -0.05em
tracking-tight: -0.025em
tracking-normal: 0
tracking-wide: 0.025em
tracking-wider: 0.05em
tracking-widest: 0.1emuppercase tracking-widetracking-wider/* Sans-serif (modern) */
font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
/* Serif */
font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
/* Monospace */
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;font-display: swap/* clamp(min, preferred, max) */
font-size: clamp(1rem, 0.5rem + 1.5vw, 1.5rem);font-size