better-typography

Reviews and fixes CSS typography covering type scales, wrapping, truncation, and OpenType features.

Updated Jun 28, 2026
One-click install
npx skills add https://github.com/AO-HyS/aohys.com --skill better-typography-ao-hys
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: better-typography
Source: https://github.com/AO-HyS/aohys.com/tree/main/.agents/skills/better-typography
Command: npx skills add https://github.com/AO-HyS/aohys.com --skill better-typography-ao-hys

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Web interfaces often ship with typography issues that only appear at real content lengths: bad wrapping, orphaned words, synthesized font weights, shifting numeric layouts, and broken heading hierarchies. This Skill provides a systematic review checklist and exact CSS fixes so text renders correctly across viewports, languages, and content lengths. ## Core Features & Use Cases - Type System Review: Validates type scales, heading hierarchy, line-height by role, letter-spacing, and measure caps (60-75 characters per line) against concrete rules. - Rendering Fixes: Covers font formats (.woff2), variable font axes, OpenType features like tabular-nums, font synthesis control, and macOS font smoothing, with a CSS-to-Tailwind cheat sheet. - Wrapping and Truncation: Applies text-wrap balance/pretty, overflow-wrap, line-clamp, ellipsis truncation, smart punctuation, and bidi handling for mixed-direction content. - Use Case: A frontend developer asks for a typography audit of a marketing page. The Skill checks computed heading sizes, finds a card description using heading line-height, detects a price display without tabular numbers, and reports findings in a severity-ranked table with exact CSS fixes. ## Quick Start Review the typography of my landing page and report any wrapping, hierarchy, or font-loading issues with fixes.

Frequently Asked Questions about better-typography

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix bad text wrapping and orphaned words in CSS?▼

Use text-wrap: balance on headings to distribute lines evenly and text-wrap: pretty on descriptions to prevent a single short word on the last line. Skip both in long-form text, and add overflow-wrap: break-word where long strings could escape containers.

How do I stop numbers from shifting layout when values change?▼

Apply font-variant-numeric: tabular-nums to any changing value like timers, counters, or prices. Default digits have varying widths, so tabular numbers keep every digit the same width and prevent layout shift.

What font format should I use on the web?▼

Use .woff2 for web fonts because it provides Brotli compression and broad browser support. Keep .woff only as a fallback for very old browsers, and avoid .ttf and .otf which are uncompressed desktop formats.

Why does iOS Safari zoom in when I focus an input?▼

iOS Safari zooms the page when an input's font-size is below 16px. Either size the input up on mobile with a responsive class like text-base sm:text-sm, or keep font-size at 16px and scale it down visually with a CSS transform.

When should I use font-variation-settings instead of font-weight?▼

Prefer standard properties like font-weight, font-optical-sizing, and font-variant-numeric because they keep working with non-variable fallback fonts. Reserve font-variation-settings and font-feature-settings for custom axes or niche features with no dedicated property.

What are the limits of text truncation with ellipsis?▼

Single-line truncation uses text-overflow: ellipsis with overflow: hidden and white-space: nowrap, while line-clamp handles multiple lines. Truncation hides content, so when the missing text matters, keep the full value reachable in a tooltip or expanded view.