better-typography
Web typography from choosing fonts to spacing, wrapping and accessibility. Use when picking or pairing typefaces, configuring variable fonts or OpenType features, setting up a type scale, styling text in components, truncating text, styling underlines, selection, placeholders or carets, or reviewing frontend code for typography. Triggers on typography, fonts, font formats, woff2, variable fonts, font-weight, opentype, font-feature-settings, letter-spacing, line-height, type scale, tabular numbers, text-wrap, truncation, line clamp, underlines, text-decoration, text selection, iOS input zoom, font smoothing, text contrast, measure, line length, text-box, smart punctuation, drop cap.
Install
npx skills add https://github.com/jakubkrehel/skills --skill better-typographySpacing and sizing
Units, a starting type scale, the heading mapping, line-height for wrapping text and text trimming.
Units
Type scale
Pick an existing scale or define one. Tailwind's text-xs through text-9xl, each pairing a size with a line height, is a solid ready-made choice.
A starting point for a product interface, named by role:
Emphasis within a role is one weight step up (400 → 500), not a size change.
Heading hierarchy
In Tailwind, centralize the per-level classes in a component or @layer base rather than repeating them inline.
Line-height for wrapping text
Text trimming with text-box
text-box takes which edges to trim (trim-both, trim-start, trim-end) and where. Name both edges, start then end. cap, ex and alphabetic need a second edge value, so trim-start cap is dropped and trim-start cap text is not.
Supported in Chromium 133+ and Safari 18.2+, not yet Firefox. Unsupported browsers keep the default leading.