[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6BSPNBRN97MXPRVS9GEX6J4":3,"skill-same:01M6BSPNBRN97MXPRVS9GEX6J4":117},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":17,"ownerHtmlUrl":49,"ownerBlogUrl":50,"ownerDescription":51,"updatedAt":52,"install":53,"resources":66},"01M6BSPNBRN97MXPRVS9GEX6J4","better-typography","Web 字体排版设计","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, checking heading hierarchy, 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, heading hierarchy, heading levels, 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.","Web 字体排版：从选择字体到间距、换行与可访问性。适用于选择或搭配字体、配置可变字体或 OpenType 特性、设置字号层级（type scale）、检查标题层级、设置组件中文本样式、文本截断、下划线样式、文本选中态、占位符或光标样式，或审查前端代码的排版。触发词包括 typography、字体、字体格式、woff2、可变字体、font-weight、opentype、font-feature-settings、letter-spacing、line-height、type scale、标题层级、标题级别、tabular numbers、text-wrap、截断、line clamp、下划线、text-decoration、文本选中、iOS 输入框缩放、字体平滑、文本对比度、measure、行宽、text-box、智能标点、首字下沉。","mikker\u002Fdotfiles","mikker","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F2819?v=4","01M6BSPF9WRVEQ89CW9NNJ7JK4","Mikkel Malmberg","01M6BSPFEEZKZSB4B603CZGV9W",116,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fmikker\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fagents.symlink\u002Fskills-bak\u002Fbetter-typography\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQMKHSMFVQHR2KYAEVN","界面设计师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRASNPVNJVQQJ4KZX8XM5D","前端开发与界面实现","SCENARIO","使用场景",[31,32,33,34,35,36,37,38],"better typography","frontend","web","accessibility","components","code","ios","box","2026-11-10 10:12:30",false,"---\nname: better-typography\ndescription: 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, checking heading hierarchy, 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, heading hierarchy, heading levels, 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.\n---\n\n# Great typography\n\nGood typography is mostly restraint. A sensible scale, comfortable spacing and enough contrast beat any clever effect. A label, a table cell, a marketing headline and an article paragraph should not share one set of rules. Apply these principles when building or reviewing anything with text in it.\n\nWhen reviewing, read the page instead of scanning the code: squint to check the hierarchy holds, read one full paragraph for comfort, and resize the viewport to catch bad wrapping, widows and truncation at real content lengths.\n\nThe words themselves (button labels, error messages, empty states) are covered by the `better-writing` skill; semantic heading structure by `better-accessibility`; spatial RTL layout and logical CSS properties by `better-layout`; rendered-pair contrast measurement and color remediation by `better-colors`. This skill owns how text renders, wraps, and behaves in mixed-direction content.\n\n**Match the project's styling system.** Before suggesting or writing any fix, check how the codebase styles things and express every change in that system: Tailwind utilities in a Tailwind project, plain declarations in CSS, CSS Modules, styled-components or StyleX. The [cheat sheet](css-cheat-sheet.md) maps each declaration to its Tailwind equivalent. Never introduce a second styling approach just to apply a typography fix.\n\n## Quick Reference\n\n| Category | When to use | Reference |\n| --- | --- | --- |\n| Choosing fonts | Font categories, pairing, formats, typeface anatomy | [choosing-fonts.md](choosing-fonts.md) |\n| Variable fonts & OpenType | Axes, weights, tabular numbers, stylistic sets | [variable-fonts-and-opentype.md](variable-fonts-and-opentype.md) |\n| Spacing & sizing | Type scale, heading hierarchy, line-height, letter-spacing, text trimming | [spacing-and-sizing.md](spacing-and-sizing.md) |\n| Wrapping & punctuation | Measure, wrapping, truncation, smart punctuation, RTL | [wrapping-and-punctuation.md](wrapping-and-punctuation.md) |\n| Details & accessibility | Underlines, selection, forms, decorative text, contrast | [details-and-accessibility.md](details-and-accessibility.md) |\n| CSS cheat sheet | Quick lookup of every property covered, with Tailwind equivalents | [css-cheat-sheet.md](css-cheat-sheet.md) |\n\n## Core Principles\n\n### 1. Serve the Right Format\n\nUse `.woff2` (Brotli compression, broadly supported) on the web. `.woff` is a fallback only for very old browsers; `.ttf` and `.otf` are raw desktop formats with no web compression. How the files are loaded is the project's own concern, this skill does not prescribe it.\n\n### 2. Properties Over Raw Tags\n\nWhen a CSS property exists, use it. `font-weight: 650` instead of `font-variation-settings: \"wght\" 650`, `font-optical-sizing: auto` instead of `\"opsz\"`, `font-variant-numeric: tabular-nums` instead of `font-feature-settings: \"tnum\" 1`. Properties keep working when a non-variable fallback renders. Reserve the raw-tag properties for custom axes (`\"GRAD\" 80`) and niche features (`\"ss01\" 1`) that have no property of their own.\n\n### 3. Load Intended Weights and Styles\n\nBrowsers may synthesize a requested weight or style that the active family does not provide. Prefer loading the faces the design actually uses. Set `font-synthesis: none` only after verifying that every required bold, italic, small-cap, superscript, and subscript form remains visually distinct across the complete fallback stack; disabling synthesis is not a diagnostic and must not erase emphasis.\n\n### 4. Fewer Fonts, Sizes and Weights\n\nRarely use more than three fonts. Weight and size define hierarchy, but overusing them hurts readability quickly. Pair for contrast, not similarity: a serif headline with a sans body reads as deliberate, two near-identical sans-serifs read as a mistake. Below `18px`, stay at weight `400`+; weights under `300` are display-only (`28px`+), they disappear at text sizes.\n\n### 5. Use a Type Scale with Semantic Names\n\nDefine a small set of sizes and deviate from it as little as possible. Hard-coded sizes without a system break down at scale. For solo projects, default names like `text-sm` work fine as long as the usage rules are clear. On a team, name sizes by use (`text-body-sm`), not by size, so the rules stay consistent.\n\n### 6. Heading Sizes Descend with Level\n\nWithin a coherent page hierarchy, map heading levels to descending steps of the type scale: a visually subordinate heading should not accidentally overpower its parent. Adjacent levels may share a size toward the small end of the scale as long as weight or spacing keeps them distinct. Pick semantic heading elements according to `better-accessibility`; this skill controls only their visual treatment.\n\n### 7. Line-Height by Role\n\nHeadings tighter, around `1.1`. Body copy `1.5` to `1.6`. Prefer unitless values so line-height scales with the font size; fixed values like `24px` do not. Tight line-height is for short text: anything that wraps to three or more lines needs at least `1.4`, even in height-constrained rows.\n\n### 8. Letter-Spacing by Size\n\nLarge headings often look better with slightly negative letter-spacing. Small uppercase labels need a little positive letter-spacing so letters do not feel crowded. Body copy at reading sizes needs neither.\n\n### 9. Cap the Measure\n\nLong lines make it hard for the eye to find the next line. Cap long-form text around 60–75 characters per line. Any unit works: `65ch` measures characters directly, and a pixel or rem cap is just as good: at a `16px` body size the range lands roughly between `560px` and `680px` depending on the font, so Tailwind's `max-w-xl` or `max-w-2xl` fit. What matters is that a cap exists and the resulting line length sits in range.\n\n### 10. Wrap Deliberately\n\n`text-wrap: balance` distributes text evenly across lines: use it on headings. `text-wrap: pretty` avoids leaving a single short word on the final line: use it on descriptions. Skip both in long-form text: browsers ignore `balance` past a few lines anyway, and evening out a whole paragraph wastes space and makes it harder to read. `overflow-wrap: break-word` where long words, links or IDs could escape the container. `white-space: nowrap` on labels and badges where a line break looks broken.\n\n### 11. Tabular Numbers on Changing Values\n\nDigits have different widths by default, so timers, counters and prices shift layout as they update. Apply `font-variant-numeric: tabular-nums` to any value that changes.\n\n### 12. Truncate Without Losing Content\n\nSingle line: `text-overflow: ellipsis` with `overflow: hidden` and `white-space: nowrap`. Multiple lines: `line-clamp`. Truncation hides content, so if the missing text matters, keep the full value reachable in a tooltip or expanded view.\n\n### 13. Write Copy Naturally, Style with CSS\n\nStore text in natural case and control presentation with `text-transform`, so redesigns never require rewriting copy. Use smart punctuation: curly quotes in prose (straight quotes in code), an en dash for ranges like `2010–2020`, an em dash to set off a thought, the single ellipsis character, `&nbsp;` to keep values like `16 px` together and `&shy;` to control where long words may break.\n\n### 14. Underlines from the Font\n\nDefault underlines sit wherever the browser decides. Pull position and thickness from the font's own metrics with `text-underline-position: from-font` and `text-decoration-thickness: from-font`, or tune manually with `text-decoration-thickness`, `text-underline-offset` and `text-decoration-skip-ink`. `text-decoration-style` draws the line dotted, dashed or wavy; a dotted underline is a common hint that a word carries extra information, like an abbreviation or a defined term. Unless the only thing animating is a color change, build the underline as a separate element instead of using `text-decoration`: color is the only part of a real underline that animates reliably.\n\n### 15. Inputs at 16px on Mobile\n\niOS Safari zooms the whole page when an input's text is smaller than `16px`. Keep input text at `16px` on mobile viewports (`text-base sm:text-sm`). Avoid the `maximum-scale=1` viewport meta: Safari ignores it for pinch zoom, but every other browser honors it and blocks zooming, which fails WCAG.\n\n### 16. Size and Contrast Floors\n\nStart long-form body text near the browser default of `16px`, then judge it in the actual typeface, measure, platform, and product density. UI text can go smaller: `14px` is a useful starting point for inputs and menus (inputs still need `16px` on mobile, see principle 15), `13px` for captions, rarely below `12px`. When text appears low-contrast, use `better-colors` to measure the rendered pair and `better-accessibility` to classify the requirement; do not change colors unless asked.\n\n### 17. Font Smoothing on the Root\n\nOn macOS text renders heavier than intended. Apply `-webkit-font-smoothing: antialiased` and `-moz-osx-font-smoothing: grayscale` (both covered by Tailwind's `antialiased`) once on the root layout so they cover all text.\n\n### 18. Language and Bidi Behavior\n\nSet `lang` so browsers and assistive technology choose the right pronunciation, quotes, and hyphenation. Set `dir` at the document or content boundary where direction changes, preserve digit order, and use `\u003Cbdi>` for isolated mixed-direction values when needed. Spatial mirroring and logical CSS properties belong to `better-layout`.\n\n### 19. Keep Useful Text Selectable\n\n`::selection` can carry brand into the reading experience when the selected combination stays legible. Keep text selectable by default. Use `user-select: none` only on a specific draggable or gesture-driven surface where accidental selection demonstrably interferes with the interaction; never disable selection across the interface or merely because a button label can be highlighted.\n\n## Common Mistakes\n\n| Mistake | Fix |\n| --- | --- |\n| `.ttf`\u002F`.otf` served on the web | Convert to `.woff2` |\n| `font-variation-settings: \"wght\"` for weight | `font-weight` (works with non-variable fallbacks) |\n| `font-feature-settings: \"tnum\" 1` | `font-variant-numeric: tabular-nums` |\n| Synthesized face differs from the intended design | Load the required face; disable only the verified synthesis mode without erasing emphasis |\n| Hard-coded one-off font sizes | Use the type scale |\n| Child heading visually overpowers its parent | Map that section's hierarchy to descending scale steps |\n| Heading element picked for its default size | Choose semantics with `better-accessibility`, then set the visual size in CSS |\n| `line-height: 24px` on scalable text | Unitless value (`1.5`) |\n| Full-width paragraphs | Cap around 60–75 characters per line |\n| Orphan on the last line of a paragraph | `text-wrap: pretty` |\n| Lopsided two-line heading | `text-wrap: balance` |\n| Numbers cause layout shift | `tabular-nums` |\n| Truncated text with no way to read it | Tooltip or expanded view for the full value |\n| `UPPERCASE` typed into copy | Natural case + `text-transform` |\n| Justified text in an interface | `text-align: start`; reserve justify for specific editorial layouts |\n| Underline cuts through descenders | `text-decoration-skip-ink: auto`, `from-font` metrics |\n| Inputs below `16px` zoom on iOS | `text-base sm:text-sm` |\n| Root layout omits font smoothing | Apply `antialiased` once at the root |\n| Mixed-direction value renders in the wrong order | Set the correct `lang`\u002F`dir`; isolate the value with `\u003Cbdi>` when needed |\n| Selection disabled across application chrome | Restore selection; suppress it only on a specific interaction that conflicts with dragging or gestures |\n| Extra-info hint with no visual cue | Dotted underline via `text-decoration-style: dotted` |\n| Thin\u002FLight weight on `14px` UI text | Weight `400`+ below `18px`; thin weights are display-only |\n| `leading-none` on a three-line card description | At least `1.4` on any text that wraps to 3+ lines |\n\n## Review Output Format\n\nUse this format only when the user asks for a standalone typography review. When `better-interface` orchestrates the review, provide domain evidence and findings to that skill and let its output format, severity scale, consolidation rules, cap, and verdict take precedence.\n\nPresent the standalone review in two parts.\n\n### Findings\n\nGroup all confirmed findings by principle. Use a markdown table with **Severity**, **Location**, **Before**, **After**, and **Why** columns. Never use separate \"Before:\" \u002F \"After:\" lines.\n\n- **Severity**: `HIGH` makes text unreadable, unavailable, or structurally misleading; `MEDIUM` harms hierarchy, wrapping, or scanning; `LOW` is isolated typographic polish.\n- **Location**: cite `path\u002Fto\u002Ffile:line`. If the artifact has no source files, cite the exact screen and component instead.\n- **Before \u002F After**: show the current typography and an actionable replacement.\n- **Why**: name the violated principle and its effect on readability or hierarchy.\n\nConsolidate a repeated systemic issue into one row and list every affected location. Omit principles with no findings.\n\n### Example\n\n#### Tabular numbers\n| Severity | Location | Before | After | Why |\n| --- | --- | --- | --- | --- |\n| MEDIUM | `src\u002FPrice.tsx:17` | `\u003Cspan>{price}\u003C\u002Fspan>` on a live price | `\u003Cspan className=\"tabular-nums\">{price}\u003C\u002Fspan>` | Proportional digits cause changing values to shift |\n| LOW | `src\u002Fnumbers.css:8` | `font-feature-settings: \"tnum\" 1` | `font-variant-numeric: tabular-nums` | The high-level property preserves fallback behavior |\n\n#### Line-height and measure\n| Severity | Location | Before | After | Why |\n| --- | --- | --- | --- | --- |\n| MEDIUM | `src\u002FArticle.tsx:33` | `leading-none` on a body paragraph | `leading-normal` (`1.5`–`1.6`) | Wrapped body text needs enough vertical separation |\n| MEDIUM | `src\u002Farticle.css:12` | Full-width article column | `max-width` near 65 characters at `16px` | Long measures make lines hard to track |\n\n### Verification and Verdict\n\nAfter the findings:\n\n1. **Verification**: list the exact checks run and their observed results, including wrapping, hierarchy, text resizing, font loading, and dynamic-value stability when applicable. If a check was not run, state what still needs verification.\n2. **Verdict**: `Block` if any `HIGH` finding remains, `Needs changes` if only `MEDIUM` or `LOW` findings remain, and `Approve` only when no actionable findings remain.\n\nWhen there are no findings, omit the tables, state \"No actionable typography findings\", report verification, and end with `Approve`.\n","# Great typography\n\nGood typography is mostly restraint. A sensible scale, comfortable spacing and enough contrast beat any clever effect. A label, a table cell, a marketing headline and an article paragraph should not share one set of rules. Apply these principles when building or reviewing anything with text in it.\n\nWhen reviewing, read the page instead of scanning the code: squint to check the hierarchy holds, read one full paragraph for comfort, and resize the viewport to catch bad wrapping, widows and truncation at real content lengths.\n\nThe words themselves (button labels, error messages, empty states) are covered by the `better-writing` skill; semantic heading structure by `better-accessibility`; spatial RTL layout and logical CSS properties by `better-layout`; rendered-pair contrast measurement and color remediation by `better-colors`. This skill owns how text renders, wraps, and behaves in mixed-direction content.\n\n**Match the project's styling system.** Before suggesting or writing any fix, check how the codebase styles things and express every change in that system: Tailwind utilities in a Tailwind project, plain declarations in CSS, CSS Modules, styled-components or StyleX. The [cheat sheet](css-cheat-sheet.md) maps each declaration to its Tailwind equivalent. Never introduce a second styling approach just to apply a typography fix.\n\n## Quick Reference\n\n| Category | When to use | Reference |\n| --- | --- | --- |\n| Choosing fonts | Font categories, pairing, formats, typeface anatomy | [choosing-fonts.md](choosing-fonts.md) |\n| Variable fonts & OpenType | Axes, weights, tabular numbers, stylistic sets | [variable-fonts-and-opentype.md](variable-fonts-and-opentype.md) |\n| Spacing & sizing | Type scale, heading hierarchy, line-height, letter-spacing, text trimming | [spacing-and-sizing.md](spacing-and-sizing.md) |\n| Wrapping & punctuation | Measure, wrapping, truncation, smart punctuation, RTL | [wrapping-and-punctuation.md](wrapping-and-punctuation.md) |\n| Details & accessibility | Underlines, selection, forms, decorative text, contrast | [details-and-accessibility.md](details-and-accessibility.md) |\n| CSS cheat sheet | Quick lookup of every property covered, with Tailwind equivalents | [css-cheat-sheet.md](css-cheat-sheet.md) |\n\n## Core Principles\n\n### 1. Serve the Right Format\n\nUse `.woff2` (Brotli compression, broadly supported) on the web. `.woff` is a fallback only for very old browsers; `.ttf` and `.otf` are raw desktop formats with no web compression. How the files are loaded is the project's own concern, this skill does not prescribe it.\n\n### 2. Properties Over Raw Tags\n\nWhen a CSS property exists, use it. `font-weight: 650` instead of `font-variation-settings: \"wght\" 650`, `font-optical-sizing: auto` instead of `\"opsz\"`, `font-variant-numeric: tabular-nums` instead of `font-feature-settings: \"tnum\" 1`. Properties keep working when a non-variable fallback renders. Reserve the raw-tag properties for custom axes (`\"GRAD\" 80`) and niche features (`\"ss01\" 1`) that have no property of their own.\n\n### 3. Load Intended Weights and Styles\n\nBrowsers may synthesize a requested weight or style that the active family does not provide. Prefer loading the faces the design actually uses. Set `font-synthesis: none` only after verifying that every required bold, italic, small-cap, superscript, and subscript form remains visually distinct across the complete fallback stack; disabling synthesis is not a diagnostic and must not erase emphasis.\n\n### 4. Fewer Fonts, Sizes and Weights\n\nRarely use more than three fonts. Weight and size define hierarchy, but overusing them hurts readability quickly. Pair for contrast, not similarity: a serif headline with a sans body reads as deliberate, two near-identical sans-serifs read as a mistake. Below `18px`, stay at weight `400`+; weights under `300` are display-only (`28px`+), they disappear at text sizes.\n\n### 5. Use a Type Scale with Semantic Names\n\nDefine a small set of sizes and deviate from it as little as possible. Hard-coded sizes without a system break down at scale. For solo projects, default names like `text-sm` work fine as long as the usage rules are clear. On a team, name sizes by use (`text-body-sm`), not by size, so the rules stay consistent.\n\n### 6. Heading Sizes Descend with Level\n\nWithin a coherent page hierarchy, map heading levels to descending steps of the type scale: a visually subordinate heading should not accidentally overpower its parent. Adjacent levels may share a size toward the small end of the scale as long as weight or spacing keeps them distinct. Pick semantic heading elements according to `better-accessibility`; this skill controls only their visual treatment.\n\n### 7. Line-Height by Role\n\nHeadings tighter, around `1.1`. Body copy `1.5` to `1.6`. Prefer unitless values so line-height scales with the font size; fixed values like `24px` do not. Tight line-height is for short text: anything that wraps to three or more lines needs at least `1.4`, even in height-constrained rows.\n\n### 8. Letter-Spacing by Size\n\nLarge headings often look better with slightly negative letter-spacing. Small uppercase labels need a little positive letter-spacing so letters do not feel crowded. Body copy at reading sizes needs neither.\n\n### 9. Cap the Measure\n\nLong lines make it hard for the eye to find the next line. Cap long-form text around 60–75 characters per line. Any unit works: `65ch` measures characters directly, and a pixel or rem cap is just as good: at a `16px` body size the range lands roughly between `560px` and `680px` depending on the font, so Tailwind's `max-w-xl` or `max-w-2xl` fit. What matters is that a cap exists and the resulting line length sits in range.\n\n### 10. Wrap Deliberately\n\n`text-wrap: balance` distributes text evenly across lines: use it on headings. `text-wrap: pretty` avoids leaving a single short word on the final line: use it on descriptions. Skip both in long-form text: browsers ignore `balance` past a few lines anyway, and evening out a whole paragraph wastes space and makes it harder to read. `overflow-wrap: break-word` where long words, links or IDs could escape the container. `white-space: nowrap` on labels and badges where a line break looks broken.\n\n### 11. Tabular Numbers on Changing Values\n\nDigits have different widths by default, so timers, counters and prices shift layout as they update. Apply `font-variant-numeric: tabular-nums` to any value that changes.\n\n### 12. Truncate Without Losing Content\n\nSingle line: `text-overflow: ellipsis` with `overflow: hidden` and `white-space: nowrap`. Multiple lines: `line-clamp`. Truncation hides content, so if the missing text matters, keep the full value reachable in a tooltip or expanded view.\n\n### 13. Write Copy Naturally, Style with CSS\n\nStore text in natural case and control presentation with `text-transform`, so redesigns never require rewriting copy. Use smart punctuation: curly quotes in prose (straight quotes in code), an en dash for ranges like `2010–2020`, an em dash to set off a thought, the single ellipsis character, `&nbsp;` to keep values like `16 px` together and `&shy;` to control where long words may break.\n\n### 14. Underlines from the Font\n\nDefault underlines sit wherever the browser decides. Pull position and thickness from the font's own metrics with `text-underline-position: from-font` and `text-decoration-thickness: from-font`, or tune manually with `text-decoration-thickness`, `text-underline-offset` and `text-decoration-skip-ink`. `text-decoration-style` draws the line dotted, dashed or wavy; a dotted underline is a common hint that a word carries extra information, like an abbreviation or a defined term. Unless the only thing animating is a color change, build the underline as a separate element instead of using `text-decoration`: color is the only part of a real underline that animates reliably.\n\n### 15. Inputs at 16px on Mobile\n\niOS Safari zooms the whole page when an input's text is smaller than `16px`. Keep input text at `16px` on mobile viewports (`text-base sm:text-sm`). Avoid the `maximum-scale=1` viewport meta: Safari ignores it for pinch zoom, but every other browser honors it and blocks zooming, which fails WCAG.\n\n### 16. Size and Contrast Floors\n\nStart long-form body text near the browser default of `16px`, then judge it in the actual typeface, measure, platform, and product density. UI text can go smaller: `14px` is a useful starting point for inputs and menus (inputs still need `16px` on mobile, see principle 15), `13px` for captions, rarely below `12px`. When text appears low-contrast, use `better-colors` to measure the rendered pair and `better-accessibility` to classify the requirement; do not change colors unless asked.\n\n### 17. Font Smoothing on the Root\n\nOn macOS text renders heavier than intended. Apply `-webkit-font-smoothing: antialiased` and `-moz-osx-font-smoothing: grayscale` (both covered by Tailwind's `antialiased`) once on the root layout so they cover all text.\n\n### 18. Language and Bidi Behavior\n\nSet `lang` so browsers and assistive technology choose the right pronunciation, quotes, and hyphenation. Set `dir` at the document or content boundary where direction changes, preserve digit order, and use `\u003Cbdi>` for isolated mixed-direction values when needed. Spatial mirroring and logical CSS properties belong to `better-layout`.\n\n### 19. Keep Useful Text Selectable\n\n`::selection` can carry brand into the reading experience when the selected combination stays legible. Keep text selectable by default. Use `user-select: none` only on a specific draggable or gesture-driven surface where accidental selection demonstrably interferes with the interaction; never disable selection across the interface or merely because a button label can be highlighted.\n\n## Common Mistakes\n\n| Mistake | Fix |\n| --- | --- |\n| `.ttf`\u002F`.otf` served on the web | Convert to `.woff2` |\n| `font-variation-settings: \"wght\"` for weight | `font-weight` (works with non-variable fallbacks) |\n| `font-feature-settings: \"tnum\" 1` | `font-variant-numeric: tabular-nums` |\n| Synthesized face differs from the intended design | Load the required face; disable only the verified synthesis mode without erasing emphasis |\n| Hard-coded one-off font sizes | Use the type scale |\n| Child heading visually overpowers its parent | Map that section's hierarchy to descending scale steps |\n| Heading element picked for its default size | Choose semantics with `better-accessibility`, then set the visual size in CSS |\n| `line-height: 24px` on scalable text | Unitless value (`1.5`) |\n| Full-width paragraphs | Cap around 60–75 characters per line |\n| Orphan on the last line of a paragraph | `text-wrap: pretty` |\n| Lopsided two-line heading | `text-wrap: balance` |\n| Numbers cause layout shift | `tabular-nums` |\n| Truncated text with no way to read it | Tooltip or expanded view for the full value |\n| `UPPERCASE` typed into copy | Natural case + `text-transform` |\n| Justified text in an interface | `text-align: start`; reserve justify for specific editorial layouts |\n| Underline cuts through descenders | `text-decoration-skip-ink: auto`, `from-font` metrics |\n| Inputs below `16px` zoom on iOS | `text-base sm:text-sm` |\n| Root layout omits font smoothing | Apply `antialiased` once at the root |\n| Mixed-direction value renders in the wrong order | Set the correct `lang`\u002F`dir`; isolate the value with `\u003Cbdi>` when needed |\n| Selection disabled across application chrome | Restore selection; suppress it only on a specific interaction that conflicts with dragging or gestures |\n| Extra-info hint with no visual cue | Dotted underline via `text-decoration-style: dotted` |\n| Thin\u002FLight weight on `14px` UI text | Weight `400`+ below `18px`; thin weights are display-only |\n| `leading-none` on a three-line card description | At least `1.4` on any text that wraps to 3+ lines |\n\n## Review Output Format\n\nUse this format only when the user asks for a standalone typography review. When `better-interface` orchestrates the review, provide domain evidence and findings to that skill and let its output format, severity scale, consolidation rules, cap, and verdict take precedence.\n\nPresent the standalone review in two parts.\n\n### Findings\n\nGroup all confirmed findings by principle. Use a markdown table with **Severity**, **Location**, **Before**, **After**, and **Why** columns. Never use separate \"Before:\" \u002F \"After:\" lines.\n\n- **Severity**: `HIGH` makes text unreadable, unavailable, or structurally misleading; `MEDIUM` harms hierarchy, wrapping, or scanning; `LOW` is isolated typographic polish.\n- **Location**: cite `path\u002Fto\u002Ffile:line`. If the artifact has no source files, cite the exact screen and component instead.\n- **Before \u002F After**: show the current typography and an actionable replacement.\n- **Why**: name the violated principle and its effect on readability or hierarchy.\n\nConsolidate a repeated systemic issue into one row and list every affected location. Omit principles with no findings.\n\n### Example\n\n#### Tabular numbers\n| Severity | Location | Before | After | Why |\n| --- | --- | --- | --- | --- |\n| MEDIUM | `src\u002FPrice.tsx:17` | `\u003Cspan>{price}\u003C\u002Fspan>` on a live price | `\u003Cspan className=\"tabular-nums\">{price}\u003C\u002Fspan>` | Proportional digits cause changing values to shift |\n| LOW | `src\u002Fnumbers.css:8` | `font-feature-settings: \"tnum\" 1` | `font-variant-numeric: tabular-nums` | The high-level property preserves fallback behavior |\n\n#### Line-height and measure\n| Severity | Location | Before | After | Why |\n| --- | --- | --- | --- | --- |\n| MEDIUM | `src\u002FArticle.tsx:33` | `leading-none` on a body paragraph | `leading-normal` (`1.5`–`1.6`) | Wrapped body text needs enough vertical separation |\n| MEDIUM | `src\u002Farticle.css:12` | Full-width article column | `max-width` near 65 characters at `16px` | Long measures make lines hard to track |\n\n### Verification and Verdict\n\nAfter the findings:\n\n1. **Verification**: list the exact checks run and their observed results, including wrapping, hierarchy, text resizing, font loading, and dynamic-value stability when applicable. If a check was not run, state what still needs verification.\n2. **Verdict**: `Block` if any `HIGH` finding remains, `Needs changes` if only `MEDIUM` or `LOW` findings remain, and `Approve` only when no actionable findings remain.\n\nWhen there are no findings, omit the tables, state \"No actionable typography findings\", report verification, and end with `Approve`.\n",{"name":5,"description":7},"master","8d883d350240b10cc23da854de1fb212e889caed","agents.symlink\u002Fskills-bak\u002Fbetter-typography",4,"https:\u002F\u002Fgithub.com\u002Fmikker\u002Fdotfiles","https:\u002F\u002Fgithub.com\u002Fmikker","https:\u002F\u002Fmikkelmalmberg.com\u002Fama","Top Highlight – research at @githubnext","2026-11-10 22:09:39",{"source":9,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add mikker\u002Fdotfiles --skill better-typography",{"tool":59,"command":60},"bunx","bunx skills add mikker\u002Fdotfiles --skill better-typography",{"tool":62,"command":63},"pnpm","pnpm dlx skills add mikker\u002Fdotfiles --skill better-typography","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmikker\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fagents.symlink\u002Fskills-bak\u002Fbetter-typography\u002FSKILL.md",true,[67,73,77,81,85,89,93,97,101,105,109,113],{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"agents\u002Fopenai.yaml","REFERENCE","参考文档",120,"https:\u002F\u002Fgithub.com\u002Fmikker\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fagents.symlink\u002Fskills-bak\u002Fbetter-typography\u002Fagents\u002Fopenai.yaml",{"path":74,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":75,"sourceHtmlUrl":76},"choosing-fonts.md",3258,"https:\u002F\u002Fgithub.com\u002Fmikker\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fagents.symlink\u002Fskills-bak\u002Fbetter-typography\u002Fchoosing-fonts.md",{"path":78,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":79,"sourceHtmlUrl":80},"css-cheat-sheet.md",3952,"https:\u002F\u002Fgithub.com\u002Fmikker\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fagents.symlink\u002Fskills-bak\u002Fbetter-typography\u002Fcss-cheat-sheet.md",{"path":82,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":83,"sourceHtmlUrl":84},"details-and-accessibility.md",4456,"https:\u002F\u002Fgithub.com\u002Fmikker\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fagents.symlink\u002Fskills-bak\u002Fbetter-typography\u002Fdetails-and-accessibility.md",{"path":86,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":87,"sourceHtmlUrl":88},"references\u002Fplans-merging.md",6348,"https:\u002F\u002Fgithub.com\u002FChachamaru127\u002Fclaude-code-harness\u002Fblob\u002Fmain\u002Fcodex\u002F.codex\u002Fskills\u002Fmemory\u002Freferences\u002Fplans-merging.md",{"path":90,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":91,"sourceHtmlUrl":92},"references\u002Fssot-initialization.md",1266,"https:\u002F\u002Fgithub.com\u002FChachamaru127\u002Fclaude-code-harness\u002Fblob\u002Fmain\u002Fcodex\u002F.codex\u002Fskills\u002Fmemory\u002Freferences\u002Fssot-initialization.md",{"path":94,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":95,"sourceHtmlUrl":96},"references\u002Fsync-project-specs.md",3398,"https:\u002F\u002Fgithub.com\u002FChachamaru127\u002Fclaude-code-harness\u002Fblob\u002Fmain\u002Fcodex\u002F.codex\u002Fskills\u002Fmemory\u002Freferences\u002Fsync-project-specs.md",{"path":98,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":99,"sourceHtmlUrl":100},"references\u002Fsync-ssot-from-memory.md",4610,"https:\u002F\u002Fgithub.com\u002FChachamaru127\u002Fclaude-code-harness\u002Fblob\u002Fmain\u002Fcodex\u002F.codex\u002Fskills\u002Fmemory\u002Freferences\u002Fsync-ssot-from-memory.md",{"path":102,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":103,"sourceHtmlUrl":104},"references\u002Fworkflow-migration.md",5255,"https:\u002F\u002Fgithub.com\u002FChachamaru127\u002Fclaude-code-harness\u002Fblob\u002Fmain\u002Fcodex\u002F.codex\u002Fskills\u002Fmemory\u002Freferences\u002Fworkflow-migration.md",{"path":106,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":107,"sourceHtmlUrl":108},"spacing-and-sizing.md",4889,"https:\u002F\u002Fgithub.com\u002Fmikker\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fagents.symlink\u002Fskills-bak\u002Fbetter-typography\u002Fspacing-and-sizing.md",{"path":110,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":111,"sourceHtmlUrl":112},"variable-fonts-and-opentype.md",4369,"https:\u002F\u002Fgithub.com\u002Fmikker\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fagents.symlink\u002Fskills-bak\u002Fbetter-typography\u002Fvariable-fonts-and-opentype.md",{"path":114,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":115,"sourceHtmlUrl":116},"wrapping-and-punctuation.md",3579,"https:\u002F\u002Fgithub.com\u002Fmikker\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fagents.symlink\u002Fskills-bak\u002Fbetter-typography\u002Fwrapping-and-punctuation.md",[118,128,155,178,200,221],{"skillNo":119,"name":120,"nameZh":17,"description":121,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":39},"01M6WFXRC2WZQA9G5AT4D6PCAY","unslop","Cut AI tells from any writing.","https:\u002F\u002Fgithub.com\u002Fmikker\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fagents.symlink\u002Fskills\u002Funslop\u002FSKILL.md",[],[120,125,126,127],"writing","cut","true",{"skillNo":129,"name":130,"nameZh":17,"description":131,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":132,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":39},"01M6WFWGJTZWZTVED8A7DHZSCB","stageshow","Build faux product UI that looks like a real product, as a still illustration or an animated demo with a cursor. Browser and app windows, dashboards, phones, notifications, terminals, bento grids and cursor walkthroughs, framed, masked and cropped the way a marketing page, feature card or docs hero needs them. Use whenever someone wants a fake or mocked UI, a product demo or walkthrough animation, a hero or feature-card illustration of an app, a product shot in the style of a polished marketing site, or an animated cursor doing things in an interface, even if they never say \"faux UI\". React and plain CSS.","https:\u002F\u002Fgithub.com\u002Fmikker\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fagents.symlink\u002Fskills\u002Fstageshow\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fmikker\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fagents.symlink\u002Fskills\u002Fstageshow\u002FSKILL.md",[],[130,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154],"css","react","windows","browser","dashboards","product","ui","notifications","Animation","walkthrough","marketing","never","feature","as","app","framed","card","interface","hero",{"skillNo":156,"name":157,"nameZh":17,"description":158,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":159,"categories":160,"keywords":161,"publishedAt":39},"01M6WFW0TZQ1H9C9X4HMZBTBYZ","clean-copy","Cut interface copy that shouldn't exist — captions that restate a label, hints that pre-empt a worry the user never had, warnings that are scar tissue from a fixed bug. Use when writing or reviewing any user-facing string (labels, hints, empty states, toasts, confirmations, button text), or when asked to clean up \u002F tighten copy.","https:\u002F\u002Fgithub.com\u002Fmikker\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fagents.symlink\u002Fskills\u002Fclean-copy\u002FSKILL.md",[],[162,163,164,153,165,166,167,168,169,170,125,171,172,173,174,147,175,176,126,177],"copy","clean copy","clean","labels","states","when","restate","empty","STRING","Captions","text","user","use","up","bug","tighten",{"skillNo":179,"name":180,"nameZh":181,"description":182,"descriptionZh":183,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":184,"categories":185,"keywords":190,"publishedAt":39},"01M6BSWBGGT11ZA2BQ0EJH2ZBN","elyx","Elyx 设计文件处理","Elyx is a design tool with local, AI-friendly `.elyx` files for screens, components, layouts, flows, and design systems. This skill is only available to agents running in external harnesses while using the Elyx CLI. It is unavailable and must not be used when running in the ACP harness inside the Elyx app. In external harnesses, use this skill before reading, reasoning about, or answering any question that touches Elyx or `.elyx` files — authoring, editing, validating, inspecting, reviewing, refactoring, comparing, or recommending changes, including read-only analysis where you produce no edit. Do not reason about `.elyx` from source text alone; imports, instances, overrides, and layout only resolve through the tools.","Elyx 是一款设计工具，使用本地的、对 AI 友好的 `.elyx` 文件来管理屏幕、组件、布局、流程和设计系统。此技能仅对在外部 harness 中运行并使用 Elyx CLI 的智能体可用。在 Elyx 应用内部的 ACP harness 中运行时不可用，且不得使用。在外部 harness 中，凡涉及 Elyx 或 `.elyx` 文件的问题——包括创作、编辑、验证、检查、审查、重构、比较或推荐修改，以及不产生任何编辑的只读分析——在读取、推理或回答之前都应先使用此技能。不要仅凭源文本推断 `.elyx`；导入、实例、覆盖和布局只能通过工具来解析。","https:\u002F\u002Fgithub.com\u002Fmikker\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fpi\u002Fskills\u002Felyx\u002FSKILL.md",[186,189],{"categoryNo":187,"categoryName":188,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQ6TKC3WYCB32755485KS6","视觉设计",{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},[180,191,192,193,35,194,195,196,197,198,199],"acp","design","cli","reasoning","design systems","harness","produce","Tools","analysis",{"skillNo":201,"name":202,"nameZh":203,"description":204,"descriptionZh":205,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":206,"categories":207,"keywords":214,"publishedAt":39},"01M6BSW8K6Z805WVG0670SHXY9","uikit-app-modernization","UIKit 应用多窗口现代化改造","Modernizes UIKit apps for multi-window environments by replacing legacy shared-state APIs with context-appropriate modern alternatives. This includes references to mainScreen, interfaceOrientation, application and scene lifecycle, as well as safe area inset updates.","通过将旧的共享状态 API 替换为符合上下文的现代替代方案，使 UIKit 应用现代化以适配多窗口环境。这包括对 mainScreen、interfaceOrientation、application 与 scene 生命周期，以及安全区域 inset 更新的引用。","https:\u002F\u002Fgithub.com\u002Fmikker\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fagents.symlink\u002Fskills\u002Fxcode-skills\u002Fuikit-app-modernization\u002FSKILL.md",[208,211],{"categoryNo":209,"categoryName":210,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师",{"categoryNo":212,"categoryName":213,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8CA037B4PDBN5RD34KV8RPR","Apple 平台应用开发",[215,216,217,218,219,220],"uikit app modernization","app modernization","modernization","safe","state","lifecycle",{"skillNo":222,"name":223,"nameZh":224,"description":225,"descriptionZh":226,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":227,"categories":228,"keywords":231,"publishedAt":39},"01M6BSW5SCT7GQ4QX7CBSB4WF1","swiftui-whats-new-27","SwiftUI 27 新特性与变更","New SwiftUI APIs, behaviors, and deprecations in the 2027 OS releases (iOS 27 and aligned macOS\u002FwatchOS\u002FtvOS\u002FvisionOS). Consult when asked what's new in SwiftUI 27, or when working with: - @State compile errors after an SDK update (\"used before being initialized\", \"invalid redeclaration of synthesized property\") or @State becaming a macro - @ViewBuilder\u002F@ContentBuilder ambiguous overloads or type-check regressions; drag-to-reorder in any container (List, stacks, grids, custom layouts) via reorderable()\u002FreorderContainer and its drag-and-drop - AsyncImage caching, reloading on scroll, or a custom URLSession - Swipe actions outside List (ScrollView, LazyVStack, LazyVGrid) via swipeActions()\u002FswipeActionsContainer() - Toolbar overflow, visibility (visibilityPriority, ToolbarOverflowMenu, toolbarMinimizeBehavior), and pinning - Presenting a confirmationDialog or alert from an optional item binding","2027 年操作系统版本（iOS 27 及同步的 macOS\u002FwatchOS\u002FtvOS\u002FvisionOS）中新增的 SwiftUI API、行为变更和弃用项。当被问及 SwiftUI 27 有哪些新特性，或处理以下工作时请查阅： - SDK 更新后的 @State 编译错误（\"used before being initialized\"、\"invalid redeclaration of synthesized property\"），或 @State 变成宏 - @ViewBuilder\u002F@ContentBuilder 的歧义重载或类型检查回归；通过 reorderable()\u002FreorderContainer 及其拖放功能在任意容器（List、stacks、grids、自定义布局）中实现拖拽重排 - AsyncImage 缓存、滚动时重新加载或使用自定义 URLSession - 通过 swipeActions()\u002FswipeActionsContainer() 在 List 之外（ScrollView、LazyVStack、LazyVGrid）使用滑动操作 - Toolbar 溢出、可见性（visibilityPriority、ToolbarOverflowMenu、toolbarMinimizeBehavior）与固定（pinning） - 从可选 item 绑定呈现 confirmationDialog 或 alert","https:\u002F\u002Fgithub.com\u002Fmikker\u002Fdotfiles\u002Fblob\u002Fmaster\u002Fagents.symlink\u002Fskills\u002Fxcode-skills\u002Fswiftui-whats-new-27\u002FSKILL.md",[229,230],{"categoryNo":209,"categoryName":210,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":212,"categoryName":213,"taxonomyType":28,"taxonomyTypeDesc":29},[232,233,234,219,235,236,37,237,238],"swiftui whats new 27","sdk","update","compile","actions","macro","macos"]