Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问许可证需确认审计通过

web-typography网页版式

Agent Skill

web-typography 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

48,960

周安装

2,011

GitHub Stars

779

下载量

15,680
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:web-typography(网页版式)
来源仓库:https://github.com/wondelai/skills
仓库路径:skills/web-typography
安装命令:
npx skills add https://github.com/wondelai/skills --skill web-typography
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/wondelai/skills --skill web-typography

简介

为 Web 项目选择、配对和实施字体,以可读性和性能为核心优先事项。

  • 涵盖七个核心领域:阅读机制和眼睛如何处理文本、评估屏幕渲染的字体、根据目的而不是美观选择面孔、清晰对比度的配对策略、最佳测量(字体大小、行长、行高)、构建视觉层次结构以及具有高效字体加载的响应式排版
  • 强调“透明高脚杯”原则——排版应该是隐形的,为内容服务而不是引起人们的注意
  • 包括实用的 CSS 模式、诊断清单和常见错误以及实施修复
  • 提供评分框架(0-10),用于根据记录的原则评估排版实施

SKILL.md

Web Typography

A practical guide to choosing, pairing, and implementing typefaces for the web. Typography serves communication — the best typography is invisible, immersing readers in content rather than calling attention to itself.

Core Principle

Typography is the voice of your content. The typeface you choose sets tone before a single word is read. A legal site shouldn't feel playful; a children's app shouldn't feel corporate.

The "clear goblet" principle: Typography should be like a crystal-clear wine glass — the focus is on the wine (content), not the glass (type). Readers should absorb meaning, not notice letterforms.

Readers don't read, they scan. Eyes jump 7-9 characters at a time (saccades), pausing briefly (fixations). Good typography supports this natural pattern.

Scoring

Goal: 10/10. When reviewing or creating typography implementations, rate them 0-10 based on adherence to the principles below. A 10/10 means full alignment with all guidelines; lower scores indicate gaps to address. Always provide the current score and specific improvements needed to reach 10/10.

Two Contexts for Type

All typography falls into two categories:

ContextPurposePriorities
Type for a momentHeadlines, buttons, navigation, logosPersonality, impact, distinctiveness
Type to live withBody text, articles, documentationReadability, comfort, endurance

Workhorse typefaces excel at "type to live with" — they're versatile across sizes, weights, and contexts without drawing attention to themselves. Examples: Georgia, Source Sans, Freight Text, FF Meta.

Typography Framework

1. How We Read

Core concept: Understanding reading mechanics is the foundation for every typography decision. Eyes don't scan smoothly — they jump in bursts, and good typography supports this natural pattern.

Why it works: When typography aligns with how the brain processes text — through word shape recognition, consistent rhythm, and clear letterform distinction — readers absorb content faster with less fatigue. Fighting these mechanics creates friction that drives readers away.

Key insights:

  • Saccades — eyes jump in 7-9 character bursts, not smooth scanning. Line length and letter spacing directly affect saccade efficiency
  • Fixation points — eyes pause briefly to absorb content. Dense or poorly spaced text increases fixation duration and slows reading
  • Word shapes (bouma) — experienced readers recognize word silhouettes, not individual letters. Maintaining distinct boumas aids recognition speed
  • Legibility vs. readability — legibility is whether individual characters can be distinguished (a typeface concern); readability is whether text can be comfortably read for extended periods (a typography concern — size, spacing, line length). A typeface can be legible but poorly set, making it unreadable

Product applications:

ContextApplicationExample
Long-form contentOptimize for sustained reading comfort16-18px body text, 1.5-1.7 line height, 45-75 char lines
Dashboard UIOptimize for rapid scanningDistinct weight hierarchy, ample whitespace between data groups
Mobile readingAccount for variable distance and lightingSlightly larger body size (17-18px), higher contrast
DocumentationSupport both scanning and deep readingClear heading hierarchy with generous paragraph spacing
E-commerceEnable quick product comparisonConsistent number formatting, tabular figures
AccessibilitySupport readers with varying abilitiesHigh contrast, generous spacing, distinct letterforms

Copy patterns:

/* Optimal reading rhythm for body text */
.prose {
  font-size: 1.125rem;     /* 18px */
  line-height: 1.6;
  max-width: 65ch;          /* ~45-75 characters */
  letter-spacing: normal;   /* Don't force tracking on body text */
}

Ethical boundary: Typography decisions should always prioritize reader comprehension and comfort over visual novelty. Sacrificing readability for aesthetic effect excludes readers and undermines the content's purpose.

See: references/typeface-anatomy.md for terminology, letterform parts, and classification systems.

2. Evaluating Typefaces

Core concept: A typeface must pass technical, structural, and practical quality checks before it earns a place in a project. Beautiful specimens fail on screen; rigorous evaluation prevents costly mid-project typeface swaps.

Why it works: Screen rendering, variable bandwidth, and diverse devices impose constraints that print never faced. A typeface that passes structural assessment (consistent strokes, open counters, distinct letterforms) and practical assessment (file size, license, rendering) will perform reliably across the full range of real-world conditions.

Key insights:

  • Technical quality — consistent stroke weights, even color (visual density) across text blocks, good kerning pairs (AV, To, Ty), complete character set (accents, punctuation, figures), and multiple weights (at minimum: regular, bold, italic)
  • Structural assessment — adequate x-height (larger = better screen readability), open counters and apertures (a, e, c shapes), distinct letterforms (Il1, O0, rn vs. m), and appropriate contrast (thick/thin stroke variation)
  • Practical needs — works at intended sizes (test at actual use size), renders well on target screens and browsers, acceptable file size for web loading, and appropriate license for the project
  • Real content testing — always test with real content, not Lorem ipsum. Dummy text hides problems with character frequency, word length, and paragraph rhythm

Product applications:

ContextApplicationExample
Body text selectionPrioritize x-height, open counters, even colorSource Serif Pro over Didot for long reads
Headline selectionPrioritize personality and distinctiveness at large sizesPlayfair Display for editorial impact
UI/System textPrioritize legibility at small sizes and weight rangeInter or SF Pro for interface elements
Multilingual productVerify complete glyph coverage for target languagesNoto Sans for broad Unicode support
Performance-critical siteEvaluate file size and subsetting optionsVariable font single file vs. multiple static weights
Brand refreshAssess whether typeface conveys intended personalityCompare specimen at actual use sizes against brand attributes

Copy patterns:

/* Test typeface at actual use sizes */
body { font-size: 16px; }           /* Minimum body size */
.caption { font-size: 0.75rem; }    /* Stress-test small sizes */
h1 { font-size: 3rem; }            /* Check large-size character */

/* Verify rendering with font-smoothing */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

Ethical boundary: Always verify typeface licensing before implementation. Using unlicensed fonts exposes projects to legal risk and undermines the type design community that creates these tools.

See: references/evaluating-typefaces.md for detailed quality assessment criteria and structural analysis.

3. Choosing Typefaces

Core concept: Start with purpose, not aesthetics. The content's tone, reading context, duration, and personality should drive typeface selection — not personal preference or trend following.

Why it works: When typeface selection is grounded in content requirements, the result feels inevitable rather than arbitrary. Purpose-driven choices also survive stakeholder review better because they can be justified with clear reasoning rather than subjective taste.

Key insights:

  • Define the job first — body text, headlines, and UI elements may each need different faces. Clarify the role before browsing specimens
  • Match tone to content — a financial report needs different type than a bakery menu. The typeface should feel like a natural voice for the subject matter
  • Test at actual sizes — a face beautiful at 72px may be illegible at 14px. Always evaluate at the sizes where the typeface will actually be used
  • Check the family — ensure needed weights, italics, and styles exist before committing. Discovering missing weights mid-project forces compromises
  • Safe starting points — for body text, Georgia, Source Serif Pro, Charter (serif) and system fonts, Source Sans Pro, Inter, IBM Plex Sans (sans-serif) reliably work across contexts

Product applications:

ContextApplicationExample
Content-heavy siteSelect a workhorse serif or sans for sustained readingSource Serif Pro or Charter for articles
SaaS dashboardChoose a clean sans with strong tabular figuresInter or IBM Plex Sans for data-rich interfaces
Marketing landing pagePair a distinctive display face with a readable body facePlayfair Display headlines + Source Sans Pro body
Documentation sitePrioritize clarity and weight range for code + proseIBM Plex Mono for code, IBM Plex Sans for prose
Brand-driven productCommission or license a face that embodies brand valuesCustom typeface or carefully chosen match to brand personality
Accessibility-focusedSelect faces designed for maximum legibilityAtkinson Hyperlegible for vision-impaired users

Copy patterns:

/* Safe system font stack */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI',
               Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Reliable web font body stack */
body {
  font-family: 'Source Sans Pro', -apple-system,
               BlinkMacSystemFont, sans-serif;
}

Ethical boundary: Avoid choosing typefaces solely to appear trendy or sophisticated at the expense of readability. Typography that excludes readers with lower vision or reading difficulties in favor of visual style fails its fundamental purpose.

See: references/evaluating-typefaces.md for quality assessment to apply during selection.

4. Pairing Typefaces

Core concept: Successful typeface pairings create clear contrast — faces should be obviously different, not confusingly similar. One to two typefaces maximum; more requires exceptional skill.

Why it works: Contrast between typefaces creates visual hierarchy and rhythm. When two faces are too similar, they create tension without purpose — the reader senses something is "off" without knowing why. Clear structural contrast (serif + sans, light + bold, humanist + geometric) lets each face play a distinct role while coexisting harmoniously.

Key insights:

  • Contrast types — structure (serif + sans), weight (light + regular), era (humanist + geometric), and width (condensed + normal) all create effective contrast
  • Same designer strategy — faces designed by one person often share DNA that harmonizes (e.g., FF Meta + FF Meta Serif)
  • Superfamilies — typeface families designed to work together eliminate guesswork (e.g., Roboto + Roboto Slab)
  • Pairing mistakes — two serifs or two sans faces that look almost alike, both faces trying to be distinctive, mixing renaissance and postmodern without intention, one face overwhelming the other in weight

Product applications:

ContextApplicationExample
Editorial siteSerif headlines + sans body for classic readabilityPlayfair Display + Source Sans Pro
Tech productSuperfamily for guaranteed harmonyRoboto + Roboto Slab
Corporate siteSame-designer pairing for subtle cohesionFF Meta + FF Meta Serif
E-commerceDistinctive display + neutral bodyCondensed headline face + system sans-serif body
DocumentationMonospace code + sans-serif prose from same familyIBM Plex Mono + IBM Plex Sans
Minimal brandSingle family with weight variationInter at varying weights and sizes

Copy patterns:

/* Classic serif + sans-serif pairing */
h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif;
}
body {
  font-family: 'Source Sans Pro', -apple-system, sans-serif;
}

/* Superfamily pairing */
h1, h2, h3 {
  font-family: 'Roboto Slab', serif;
}
body {
  font-family: 'Roboto', sans-serif;
}

Ethical boundary: When in doubt, use one family with weight variation rather than forcing a pairing. A mismatched pairing creates cognitive friction that undermines the content, and adding complexity without purpose serves the designer's ego rather than the reader's needs.

See: references/pairing-strategies.md for specific combinations, contrast methods, and proven pairings.

5. Typographic Measurements

Core concept: Three measurements — font size, line length, and line height — form the foundation of comfortable reading. Getting these right matters more than typeface choice.

Why it works: These measurements directly govern how the eye tracks across and down text. Optimal line length (45-75 characters) matches the saccade pattern. Adequate line height (1.4-1.8) prevents the eye from jumping to the wrong line on the return sweep. Sufficient font size (16-18px minimum) ensures letterforms are large enough for comfortable recognition on screen.

Key insights:

  • Body font size — 16px minimum; err larger (18px) for reading-heavy sites. Mobile users hold phones farther than designers assume
  • Line length (measure) — 45-75 characters ideal, 66 characters optimal. Use the ch unit or max-width to enforce. Longer lines need more line height to compensate
  • Line height — 1.4-1.8 for body text. Longer lines need more; shorter lines need less. Headlines need tighter spacing (1.1-1.25)
  • Heading scale — use a consistent ratio (1.2-1.5) between heading levels to establish clear hierarchy without extremes

Product applications:

ContextApplicationExample
Blog / articleEnforce 65ch max-width with 1.6 line height.prose {max-width: 65ch; line-height: 1.6;}
DocumentationSlightly wider measure with increased line heightmax-width: 75ch; line-height: 1.7;
Mobile UILarger body size, auto-constrained measurefont-size: 17px; with viewport-width constraint
DashboardTighter line height for dense data displayline-height: 1.3; for table cells and labels
Landing pageGenerous sizing and spacing for scanabilityfont-size: 1.25rem; line-height: 1.7;
Email templateConstrained width for email client compatibilitymax-width: 600px; with inline sizing

Copy patterns:

/* Optimal body text measurements */
.prose {
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
  max-width: 65ch;
}

/* Wider columns need more line height */
.wide-text {
  max-width: 80ch;
  line-height: 1.8;
}

/* Line height adjustments by context */
h1, h2 { line-height: 1.1-1.25; }
.ui-text { line-height: 1.3-1.4; }
.body-text { line-height: 1.5-1.7; }

Ethical boundary: Never sacrifice readable measurements for layout aesthetics. Cramming text into narrow columns with tiny sizes to "fit the design" prioritizes visual arrangement over human comprehension.

See: references/responsive-typography.md for fluid sizing and viewport-based measurement strategies.

6. Building Type Hierarchies

Core concept: Hierarchy tells readers what matters most. Create distinction through controlled variation in size, weight, and color — but don't combine all levers at once.

Why it works: Visual hierarchy mimics how readers naturally prioritize information. When size, weight, and color differences between levels are deliberate and consistent, readers can scan a page and instantly understand its structure. Without hierarchy, everything competes for attention and nothing wins.

Key insights:

  • Three levers — size, weight, and color. Vary one or two between adjacent levels; varying all three creates excessive contrast that wastes headroom for deeper hierarchies
  • The squint test — squinting at a page should still reveal the hierarchy. If everything blurs into sameness, the distinction is too subtle
  • Consistent scale — use a ratio (1.2-1.5) between heading levels. Arbitrary sizes create visual noise. A modular scale creates rhythm
  • Don't skip levels — jumping from H1 to H3 breaks the reader's mental model of document structure

Product applications:

ContextApplicationExample
Content pageSize + weight variation across 4-5 levelsH1 2.5rem/700, H2 1.75rem/600, Body 1rem/400
DashboardWeight + color for data vs. label distinctionBold #111 for values, Regular #666 for labels
NavigationSize + weight to signal current vs. availableActive: bold, Inactive: regular, same size
Marketing pageLarge size jumps for dramatic scanabilityHero 3.5rem, Section heads 2rem, Body 1.125rem
Form UISubtle weight shifts for label vs. input distinctionLabel: 600 weight, Input: 400 weight
Mobile appTighter scale due to limited viewportH1 1.75rem, H2 1.25rem, Body 1rem

Copy patterns:

/* Type hierarchy with modular scale */
h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); font-weight: 700; color: #111; }
h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); font-weight: 600; color: #111; }
h3 { font-size: 1.25rem; font-weight: 600; color: #333; }
body { font-size: 1rem; font-weight: 400; color: #333; }
.secondary { font-size: 0.875rem; color: #666; }
.caption { font-size: 0.75rem; color: #888; }

/* Heading rhythm */
h1, h2, h3 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.2;
}

Ethical boundary: Hierarchy should guide readers honestly. Using visual prominence to draw attention to deceptive elements (hidden fees in small text, manipulative CTAs in bold) weaponizes typography against the reader.

See: references/css-implementation.md for complete hierarchy implementation patterns and variable font techniques.

7. Responsive Typography and Web Font Performance

Core concept: Type must adapt to screens and reading contexts, and web fonts must load efficiently. Fluid typography with clamp() eliminates breakpoint jumps, while strategic font loading prevents layout shift and slow renders.

Why it works: A single fixed font size cannot serve both a 320px phone and a 1440px desktop. Fluid scaling ensures text is always proportionate to its viewport. Meanwhile, web fonts are render-blocking by default — unoptimized loading causes Flash of Invisible Text (FOIT) or Flash of Unstyled Text (FOUT), both of which degrade the reading experience.

Key insights:

  • Fluid typographyclamp(min, preferred, max) scales font size smoothly between viewport sizes, eliminating the need for media query breakpoints for type sizing
  • Breakpoint adjustments — mobile (<640px) needs slightly larger body size (17-18px) and tighter heading scale; tablet (640-1024px) uses standard sizing with enforced line-length limits; desktop (>1024px) can use larger display type while maintaining line-length
  • Font loading strategy — use font-display: swap to show fallback text immediately, preload critical fonts with <link rel="preload">, and subset fonts to include only needed characters
  • Performance budget — aim for under 200KB total web font payload. Subset aggressively, prefer WOFF2 format, and consider variable fonts to replace multiple static weight files

Product applications:

ContextApplicationExample
Content siteFluid body and heading sizes with clamp()font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem)
E-commercePreload hero font, lazy-load secondary weights<link rel="preload" href="font.woff2" as="font">
SaaS appSystem font stack for UI, web font for marketing only-apple-system in app, custom font on landing page
Global productSubset fonts per language to reduce payloadLatin subset for English pages, CJK subset for Asian pages
Performance-criticalVariable font replacing 4-6 static filesSingle variable font file with weight axis 300-700
Progressive web appCache fonts in service worker for offline usecaches.open('fonts').then(cache => cache.addAll(...))

Copy patterns:

/* Fluid typography with clamp() */
body {
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
}
h1 {
  font-size: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

/* Performant font loading */
@font-face {
  font-family: 'Custom Font';
  src: url('/fonts/custom.woff2') format('woff2');
  font-display: swap;
  font-weight: 400;
  unicode-range: U+0000-00FF; /* Latin subset */
}

/* Preload in HTML head */
/* <link rel="preload" href="/fonts/custom.woff2" as="font" type="font/woff2" crossorigin> */

Ethical boundary: Performance optimization should not come at the cost of excluding users. Aggressive subsetting that drops characters needed by non-English readers, or removing italic/bold weights needed for emphasis, trades inclusivity for speed in ways that harm real people.

See: references/responsive-typography.md for fluid type implementation and references/css-implementation.md for @font-face, loading strategies, and variable fonts.

Common Mistakes

MistakeWhy It FailsFix
Text feels crampedInsufficient line height creates visual density that fatigues readersIncrease line-height to 1.6+; add paragraph spacing
Lines too long, hard to trackBeyond 75 characters, the eye loses its place on the return sweepAdd max-width: 65ch to text containers
Headings look disconnectedExcessive space above headings breaks their association with following contentReduce space above heading; keep space below
Text looks blurry on screenPoor font-smoothing settings or subpixel rendering issuesCheck font-smoothing; try different weight; increase size
Fonts loading slowlyUnoptimized font files block rendering and delay first contentful paintSubset fonts; use font-display: swap; preload critical fonts
Body text too smallUsers hold phones farther than assumed; small text strains older eyesIncrease to 18px; test with real users at real distance
Hierarchy is unclearInsufficient contrast between adjacent levels makes everything competeIncrease size/weight differences between levels
Typefaces clashPairing faces without clear contrast creates unresolvable visual tensionSimplify to one family; or ensure structural contrast (serif + sans)
Using Lorem ipsum for testingDummy text hides character frequency, word length, and rhythm problemsTest with real content representative of actual use

Quick Diagnostic

QuestionIf NoAction
Is body text 16px or larger?Text too small for comfortable screen readingIncrease to at least 16px; prefer 18px for reading-heavy pages
Is line length under 75 characters?Eye loses position on return sweepAdd max-width: 65ch to prose containers
Is line height 1.4 or greater for body?Lines feel cramped and reading speed dropsIncrease to 1.5-1.7 for body text
Is there sufficient contrast between type levels?Hierarchy is invisible; readers can't scanIncrease size or weight differences between adjacent levels
Have typefaces been tested at actual sizes on real screens?Rendering surprises will appear in productionTest at every use size on target devices and browsers
Is total font payload under 200KB?Slow loading degrades experience and SEOSubset fonts, use WOFF2, consider variable fonts
Are fallback fonts specified?FOIT leaves blank text while fonts loadAdd system font fallbacks in every font-family declaration
Does the page work at 200% browser zoom?Accessibility failure for low-vision usersTest at 200% zoom; fix overflow and truncation issues
Are headings free of orphaned single words?Single trailing words look unfinished and waste spaceUse text-wrap: balance or manual breaks
Are links visually distinct from surrounding text?Users cannot identify interactive elementsEnsure links have color and/or underline distinction

Reference Files

Further Reading

On Web Typography by Jason Santa Maria Publisher: A Book Apart (2014) ISBN: 978-1937557065 Amazon

About the Author

Jason Santa Maria is a graphic designer, creative director, and educator whose work has shaped how the industry thinks about typography on the web. He served as Creative Director at Typekit (now Adobe Fonts), where he helped bring high-quality type to web designers at scale. He co-founded A Book Apart, the publisher of brief books for people who make websites, and has been a leading voice in web standards and design education. Santa Maria teaches at the School of Visual Arts (SVA) in New York City and has art-directed publications including A List Apart. His work bridges the gap between traditional typographic craft and the practical realities of designing for screens, and "On Web Typography" distills his deep expertise into an accessible, opinionated guide for working web designers.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.86%
按下载量换算5,623

Claude

31.54%
按下载量换算4,945

Cursor

18.52%
按下载量换算2,904

Gemini CLI

8.74%
按下载量换算1,370

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills