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

modular-scale-typography模块化比例排版

Agent Skill

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

总安装

652

周安装

28

GitHub Stars

6

下载量

228
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/dembrandt/dembrandt-skills --skill modular-scale-typography

简介

modular-scale-typography 用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词、任务场景或来源线索快速定位候选结果。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,需结合原始 README 确认具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 可结合来源仓库和安装命令进一步核验实际功能和限制。

SKILL.md

Modular Scale Typography

Typography feels cohesive when all font sizes are related to each other through a single mathematical ratio. Without a scale, sizes get picked arbitrarily and the result feels visually noisy — headings that don't contrast enough, body text too close in size to captions, labels that blend into content.

What Is a Modular Scale

A modular scale starts from a base size and multiplies or divides by a ratio to generate every size in the system.

size(n) = base × ratio^n

Every size is thus a deliberate step away from the base — not a guess.

Choosing a Ratio

RatioNameFeelGood for
1.067Minor SecondVery tightDense data UIs, dashboards
1.125Major SecondSubtleLong-form reading, editorial
1.200Minor ThirdBalancedMost UI applications
1.250Major ThirdClear hierarchyMarketing, landing pages
1.333Perfect FourthStrong contrastDisplay, hero sections
1.414Augmented FourthDramaticPortfolios, branding
1.500Perfect FifthVery dramaticUse sparingly

Default recommendation: 1.25 (Major Third) — enough contrast between steps to feel intentional without being theatrical.

Generating a Scale

Starting from base = 16px, ratio 1.25:

StepFormulaValueRoundedRole
-216 ÷ 1.25²10.24px10pxCaption, label-xs
-116 ÷ 1.2512.80px13pxLabel, small
01616px16pxBody (base)
+116 × 1.2520px20pxBody-lg, lead
+216 × 1.25²25px25pxH4
+316 × 1.25³31.25px31pxH3
+416 × 1.25⁴39.06px39pxH2
+516 × 1.25⁵48.83px49pxH1
+616 × 1.25⁶61.04px61pxDisplay

Round to whole pixels or rem — the ratio provides the intent, exact pixel rounding is fine.

Design Tokens (CSS custom properties)

:root {
  --text-xs:   0.625rem;  /* 10px  — caption */
  --text-sm:   0.813rem;  /* 13px  — label   */
  --text-base: 1rem;      /* 16px  — body    */
  --text-lg:   1.25rem;   /* 20px  — lead    */
  --text-xl:   1.563rem;  /* 25px  — h4      */
  --text-2xl:  1.938rem;  /* 31px  — h3      */
  --text-3xl:  2.438rem;  /* 39px  — h2      */
  --text-4xl:  3.063rem;  /* 49px  — h1      */
  --text-5xl:  3.813rem;  /* 61px  — display */
}

Tailwind Config

// tailwind.config.js
fontSize: {
  'xs':   ['0.625rem', { lineHeight: '1rem' }],
  'sm':   ['0.813rem', { lineHeight: '1.25rem' }],
  'base': ['1rem',     { lineHeight: '1.5rem' }],
  'lg':   ['1.25rem',  { lineHeight: '1.75rem' }],
  'xl':   ['1.563rem', { lineHeight: '2rem' }],
  '2xl':  ['1.938rem', { lineHeight: '2.25rem' }],
  '3xl':  ['2.438rem', { lineHeight: '2.5rem' }],
  '4xl':  ['3.063rem', { lineHeight: '1.1' }],
  '5xl':  ['3.813rem', { lineHeight: '1' }],
}

Why This Makes Typography Feel Cohesive

Without a scale, designers and developers pick sizes by eye or habit (14px, 16px, 18px, 24px, 32px, 48px). These feel subtly wrong because the intervals are uneven — the jump from 14→16 is small, 32→48 is large, and there is no underlying logic tying them together. The eye senses the inconsistency even when the viewer cannot name it.

With a modular scale, every size step carries the same visual weight of change. Hierarchy reads clearly because each level is a proportional step away from the next, not an arbitrary gap.

Minimum Font Size

Body text base: 16px minimum. This is the browser default for good reason — it is the threshold below which reading comfort drops significantly, especially on screens.

  • 16px — standard body text, the default base
  • 14px — acceptable for secondary UI text (labels, captions, metadata) used sparingly
  • Below 14px — do not use. Even at high DPI, sub-14px text fails WCAG contrast requirements for normal text and creates accessibility issues.

In the modular scale, this means the base (step 0) should be 16px, and negative steps (step -1, step -2) should be used only for genuinely secondary content — never for body copy or primary labels.

Type Scale by Page Context

Landing pages and marketing surfaces benefit from large, expressive type — steps +4 to +6 for headlines create drama and brand presence.

Feature pages and application UI should use a more controlled range — steps +2 to +3 for headings, with body text at step 0. Oversized headings inside a functional UI distract from the content and make the layout feel unbalanced.

Match the ratio and scale usage to the purpose of the surface, not just the brand.

Heading Hierarchy and Page Complexity

A successful heading scale uses more than just font size to distinguish levels. It also respects the cognitive limits of the page.

Tools for Differentiation

If headings only differ by small increments of size, they become hard to distinguish at a glance. Use these tools to create a more meaningful scale:

  • Capitalization: Use uppercase (text-transform: uppercase) for small, lower-level headings (H4–H5) to give them visual weight without needing large sizes.
  • Letter Spacing: When using uppercase or bold headings, add a small amount of letter-spacing (e.g., 0.05em) to improve legibility and provide a "premium" feel.
  • Color: Use your brand primary colour or a slightly muted grey for secondary headings to differentiate them from the main black/dark-grey text.
  • Style: Use italics or subtle underlines for supplementary or metadata-style headings.

The Rule of Three (H1–H3)

Most well-designed pages require only three levels of heading hierarchy (H1, H2, H3).

  • Simplicity: H1–H3 is enough to cover the page title, section titles, and sub-sections.
  • Complexity Warning: If you find yourself needing H4, H5, or H6, the content is likely too dense. Instead of adding more heading levels, consider splitting the content across multiple pages or using a more modular navigation structure (e.g., a sidebar or tabs).

A page that needs 6 levels of headings is a page that most users will stop reading.

Reading Comfort and Editorial Patterns

Typography is not just about size — it is about the rhythm and structure of the content.

Line Length (Measure)

For optimal reading comfort, keep body text between 45–75 characters per line (approx. 500–700px).

  • Lines that are too long make it hard for the eye to find the start of the next line.
  • Lines that are too short break the reading rhythm and create distracting "rags."

Line Clamping

In grids, cards, or lists with unpredictable content lengths, use line-clamp to maintain a consistent visual rhythm.

.card-description {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

Limit descriptions to 2–3 lines to ensure all cards in a row remain the same height.

Editorial Hierarchy

Use specific typographic roles to provide context and guide the user through the story:

RoleVisual TreatmentPurpose
Pre-title (Eyebrow)Small (12–13px), often all-caps, high letter-spacing, muted colourProvides context or category without distracting from the main heading
HeadingLarge, bold, modular scale step +3 to +5The primary hook or subject
Ingress (Lead text)Larger than body (step +1), slightly bolder or higher line-heightSummarises the core value; bridging the heading and the body copy
BodyBase size (16px), regular weight, comfortable line-height (1.5)The primary reading experience

Wording and Voice

  • Use active voice. "Get started" instead of "Getting started is easy."
  • Be punchy. Use clear, descriptive labels that promise a result.
  • Consistency. Use the same terms for the same actions throughout the product.

Responsive Type Scale

The scale compresses on smaller viewports by tightening the ratio, not by manually overriding individual sizes. The floor (body, labels) stays stable — readability has a hard minimum. The ceiling (H1, display) shrinks significantly. Every heading level scales proportionally because the ratio changes; hierarchy stays internally coherent.

Rule: use a wider ratio on desktop (more drama), a tighter ratio on mobile (more restraint). The base stays the same. The top end gives way.

  • Desktop → wider ratio (e.g. 1.25–1.333): large contrast between H1 and body
  • Tablet → moderate ratio (e.g. 1.200): scale pulls in
  • Mobile → tight ratio (e.g. 1.125): H1 is notably smaller, body is unchanged

Never shrink the scale from the bottom. Body text at 16px is already a floor — compression always comes from the top.

Review Checklist

  • Are all font sizes derived from a single base + ratio?
  • Is the base size 16px or larger?
  • Is 14px used only for secondary/metadata text, never for body copy?
  • Is nothing below 14px used anywhere in the UI?
  • Is there at least 3–4 distinct steps between body text and the largest heading?
  • Are adjacent steps (e.g. body vs. label) different enough to be distinguishable at a glance?
  • Are font size tokens named by role (--text-body, --text-h1) or step (--text-base, --text-2xl), not by raw pixel value?
  • Does the chosen ratio suit the UI density? (tight ratio for data-heavy UIs, wider ratio for marketing)
  • Is body text line length between 45–75 characters?
  • Is line-clamping used to keep grid/card layouts consistent?
  • Are editorial roles like pre-titles and lead text used to improve scannability?
  • Are headings differentiated by more than just size (e.g., color, case, spacing)?
  • Is the heading hierarchy limited to H1–H3 per view where possible?

Common Anti-Patterns

Anti-patternProblemFix
Sizes like 14, 15, 16, 17px used side by sideSteps too small to read as distinct levelsUse at minimum a 1.125 ratio so each step is perceptible
Arbitrary sizes with no relationship (13, 18, 27, 36px)No underlying logic — hierarchy feels accidentalRegenerate from a single base and ratio
Pixel values hard-coded in components instead of tokensScale changes require hunting through every fileDefine once as CSS custom properties or design tokens
Same scale used for display headings and dense data tablesOne ratio rarely serves both extremes wellUse a tighter ratio (1.125) for data, wider (1.25–1.333) for marketing contexts

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

37.65%
按下载量换算86

Claude

31.09%
按下载量换算71

Cursor

18.64%
按下载量换算42

Gemini CLI

9.28%
按下载量换算21

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

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

安装前确认

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

来源信息

继续浏览同类 Skills