Communitygithub.com

xzedm/clipplic-landing

Webタイポグラフィ:フォント選びからスペーシング、折り返し、アクセシビリティまで。フォントの選択や組み合わせ、可変フォントやOpenType機能の設定、タイプスケールの構築、見出し階層の確認、コンポーネント内のテキストスタイリング、テキストの切り詰め、下線、選択状態、プレースホルダー、キャレットのスタイリング、フロントエンドコードのタイポグラフィレビュー時に使用します。トリガー:タイポグラフィ、フォント、フォント形式、woff2、可変フォント、font-weight、opentype、font-feature-settings、letter-spacing、line-height、タイプスケール、見出し階層、見出しレベル、tabular numbers、text-wrap、切り詰め、line clamp、下線、text-decoration、テキスト選択、iOS入力ズーム、拡大入力テキスト、フォントスムージング、テキストコントラスト、measure、行長、text-box、スマート句読点、ドロップキャップ。

clipplic-landing とは?

このスキルは、Webタイポグラフィのベストプラクティスを包括的にまとめたものです。フォントの選定や組み合わせ、可変フォントやOpenType機能の設定、タイプスケールの設計、見出し階層の整理、テキストの折り返しや切り詰め、下線や選択状態のスタイリングなど、テキストのレンダリングに関わるあらゆる側面をカバーします。主にClaude CodeやCursor、CodexなどのAIエージェント向けに設計されており、コードレビューや実装時にタイポグラフィ関連の指摘や修正提案を行えるようになります。このスキルは、プロジェクトの既存のスタイリングシステム(Tailwind CSS、CSS Modules、styled-components、StyleXなど)に沿った形で変更を提案します。また、`better-writing`(文言)、`better-accessibility`(見出しの意味構造)、`better-layout`(レイアウト)、`better-colors`(コントラスト)といった他のスキルを補完する役割を果たします。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/xzedm/clipplic-landing/tree/HEAD/.agents/skills/better-typography

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

優れたタイポグラフィ

優れたタイポグラフィとは、ほとんどが抑制です。適切なスケール、快適なスペーシング、十分なコントラストは、どんな技巧的なエフェクトよりも優れています。ラベル、テーブルのセル、マーケティングの見出し、記事の段落は、すべて同じルールを共有すべきではありません。テキストを含むものを構築またはレビューする際には、これらの原則を適用してください。

レビューするときは、コードをスキャンするのではなく、ページを読みましょう:目を細めて階層が機能しているか確認し、1つの段落全体を読みやすさのために読み、ビューポートをリサイズして、実際のコンテンツの長さでの不適切な折り返し、ウィドウ、切り詰めを見つけましょう。

単語自体(ボタンラベル、エラーメッセージ、空の状態)は better-writing スキルがカバーし、意味的な見出し構造は better-accessibility が、空間的なRTLレイアウトと論理CSSプロパティは better-layout が、レンダリングされたペアのコントラスト測定と色の修正は better-colors がカバーします。このスキルは、テキストがどのようにレンダリングされ、折り返され、混合方向のコンテンツでどのように動作するかを担当します。

プロジェクトのスタイリングシステムに合わせてください。 修正を提案または記述する前に、コードベースがどのようにスタイルを設定しているかを確認し、そのシステムで変更を表現してください:TailwindプロジェクトではTailwindユーティリティ、CSSではプレーンな宣言、CSS Modules、styled-components、またはStyleX。 チートシート は各宣言をTailwind相当にマッピングします。タイポグラフィの修正を適用するためだけに、別のスタイリングアプローチを導入しないでください。

クイックリファレンス

カテゴリ使用する場面参照先
フォントの選択フォントカテゴリ、組み合わせ、形式、書体の構造choosing-fonts.md
可変フォントとOpenType軸、ウェイト、タブラーナンバー、スタイルセットvariable-fonts-and-opentype.md
スペーシングとサイズタイプスケール、見出し階層、行間、文字間隔、テキストトリミングspacing-and-sizing.md
折り返しと句読点メジャー、折り返し、切り詰め、スマート句読点、RTLwrapping-and-punctuation.md
詳細とアクセシビリティ下線、選択、フォーム、装飾テキスト、コントラストdetails-and-accessibility.md
CSSチートシートカバーされているすべてのプロパティのクイックルックアップ、Tailwind相当を含むcss-cheat-sheet.md

基本原則

1. 適切なフォーマットを提供する

ウェブでは .woff2 (Brotli圧縮、広くサポート) を使用してください。 .woff は非常に古いブラウザのためのフォールバックのみです。 .ttf と .otf は、Web圧縮がない生のデスクトップフォーマットです。ファイルの読み込み方法はプロジェクト自身の関心事であり、このスキルはそれを規定しません。

2. 生のタグよりもプロパティを優先する

CSSプロパティが存在する場合は、それを使用してください。 font-weight: 650 を font-variation-settings: "wght" 650 の代わりに、 font-optical-sizing: auto を "opsz" の代わりに、 font-variant-numeric: tabular-nums を font-feature-settings: "tnum" 1 の代わりに。プロパティは、可変フォールバックがレンダリングされない場合でも機能し続けます。独自の軸 ("GRAD" 80) やニッチな機能 ("ss01" 1) で、対応するプロパティがないものには、生のタグプロパティを予約してください。

3. 意図したウェイトとスタイルを読み込む

ブラウザは、アクティブなフォントファミリーが提供しない要求されたウェイトやスタイルを合成することがあります。デザインが実際に使用するフェイスを読み込むことを優先してください。 font-synthesis: none は、必要なすべての太字、斜体、スモールキャップ、上付き文字、下付き文字の形式が、完全なフォールバックスタック全体で視覚的に区別可能であることを確認した後でのみ設定してください。合成の無効化は診断ツールではなく、強調を消し去ってはいけません。

4. フォント、サイズ、ウェイトは少なめに

3つ以上のフォントを使用することは稀です。ウェイトとサイズが階層を定義しますが、使いすぎると読みやすさをすぐに損ないます。類似性ではなく、コントラストを意識して組み合わせてください:セリフ見出しとサンセリフ本文は意図的に見えますが、2つほぼ同一のサンセリフはミスに見えます。 18px 未満では、ウェイト 400+ を維持してください。ウェイト 300 未満は表示専用 (28px+) であり、テキストサイズでは見えなくなります。

5. 意味的な名前を持つタイプスケールを使用する

小さなサイズのセットを定義し、そこから可能な限り逸脱しないでください。システムのないハードコードされたサイズは、スケールが大きくなると破綻します。単独のプロジェクトでは、text-sm のようなデフォルト名でも、使用ルールが明確であれば問題なく機能します。チームでは、サイズを用途 (text-body-sm) で命名し、サイズ自体で命名しないことで、ルールの一貫性を保ちます。

6. 見出しサイズはレベルに応じて小さくする

一貫したページ階層内では、見出しレベルをタイプスケールの降順にマッピングします:視覚的に従属する見出しが、誤ってその親を圧倒してはいけません。スケールの小さい方では、ウェイトやスペーシングがそれらを区別していれば、隣接するレベルが同じサイズを共有しても構いません。 better-accessibility に従って意味的な見出し要素を選択してください。このスキルは、それらの視覚的な処理のみを制御します。

7. 役割に応じた行間

見出しはよりタイトに、約 1.1。本文は 1.5 から 1.6。行間がフォントサイズに応じて拡大縮小されるように、単位なしの値を優先してください。 24px のような固定値はうまくいきません。タイトな行間は短いテキスト用です:3行以上に折り返すものは、高さが制約された行でも、少なくとも 1.4 が必要です。

8. サイズに応じた文字間隔

大きな見出しは、わずかにマイナスの文字間隔を設定すると見栄えが良くなることがよくあります。小さな大文字のラベルには、文字が密集して見えないように、少しプラスの文字間隔が必要です。読み取りサイズの本文には、どちらも必要ありません。

9. メジャー(行長)に上限を設ける

長い行は、次の行を見つけるのが難しくなります。長文は1行あたり約60~75文字に制限してください。任意の単位で機能します: 65ch は文字を直接測定し、ピクセルやremの上限も同様に機能します: 16px の本文サイズでは、範囲はフォントにもよりますが、およそ 560px から 680px の間になるため、Tailwindの max-w-xl または max-w-2xl が適合します。重要なのは、上限が存在し、結果の行長が範囲内にあることです。

10. 意図的に折り返す

text-wrap: balance はテキストを行全体に均等に分散します:見出しに使用してください。 text-wrap: pretty は最終行に短い単語が1つだけ残るのを防ぎます:説明文に使用してください。長文では両方をスキップしてください:ブラウザは数行を超えると balance を無視し、段落全体を均等にするとスペースが無駄になり、読みにくくなります。 overflow-wrap: break-word は、長い単語、リンク、IDがコンテナからはみ出す可能性がある場合に使用します。 white-space: nowrap は、改行が崩れて見えるラベルやバッジに使用します。

11. 変化する値にはタブラーナンバーを使用する

デフォルトでは数字の幅は異なるため、タイマー、カウンター、価格は更新されるたびにレイアウトが変わります。変化する値には font-variant-numeric: tabular-nums を適用してください。

12. コンテンツを失わずに切り詰める

単一行: text-overflow: ellipsis と overflow: hidden、 white-space: nowrap。複数行: line-clamp。切り詰めはコンテンツを隠すため、欠落したテキストが重要な場合は、ツールチップや展開ビューで完全な値にアクセスできるようにしてください。

13. コピーを自然に書き、CSSでスタイルを設定する

テキストは自然なケースで保存し、 text-transform で表示を制御することで、リデザイン時にコピーを書き直す必要がなくなります。スマート句読点を使用してください:散文ではカーリークォーテーション(コードではストレートクォーテーション)、 2010–2020 のような範囲にはenダッシュ、思考を区切るにはemダッシュ、単一の省略記号、 16 px のような値をまとめる  、長い単語の分割箇所を制御する ­。

14. フォント由来の下線

デフォルトの下線は、ブラウザが決めた場所に配置されます。 text-underline-position: from-font と text-decoration-thickness: from-font でフォント自身のメトリクスから位置と太さを取得するか、 text-decoration-thickness、 text-underline-offset、 text-decoration-skip-ink で手動で調整してください。 text-decoration-style は線を点線、破線、波線で描画します。点線の下線は、その単語が追加情報(略語や定義された用語など)を持っていることを示す一般的なヒントです。アニメーションするのが色の変更だけである場合を除き、 text-decoration を使用する代わりに、下線を別の要素として構築してください。色は、実際の下線で確実にアニメーションする唯一の部分です。

15. モバイルでは入力フィールドを16pxに

iOS Safariは、入力フィールドのテキストが 16px より小さいと、ページ全体をズームします。2つの修正方法があり、それぞれ異なる方法でフォントサイズを 16px に保持するため、黙って選択するのではなく、デザインがどちらを望むかを尋ねてください:モバイルで入力フィールドを大きくする (text-base sm:text-sm)、これは小さな画面で見た目が変わります。または、 font-size: 16px を維持し、transform: scale() で意図したサイズをレンダリングし、幅と line-height を調整して、すべてのビューポートでデザインが同一になるようにします。 両方のレシピ。

16. サイズとコントラストの下限

長文の本文は、ブラウザのデフォルトである 16px 付近から始め、実際の書体、メジャー、プラットフォーム、プロダクトの密度で判断してください。UIテキストはより小さくできます: 14px は入力フィールドやメニューの出発点として有用ですが(入力フィールドはモバイルではまだ 16px が必要です、原則15参照)、 13px はキャプション用で、 12px を下回ることは稀です。テキストのコントラストが低いように見える場合は、 better-colors を使用してレンダリングされたペアを測定し、 better-accessibility を使用して要件を分類してください。依頼がない限り、色を変更しないでください。

17. ルート要素にフォントスムージングを適用する

macOSでは、テキストは意図より太くレンダリングされます。 -webkit-font-smoothing: antialiased と -moz-osx-font-smoothing: grayscale (どちらもTailwindの antialiased でカバーされます) をルートレイアウトに1回適用して、すべてのテキストをカバーしてください。

18. 言語と双方向テキストの動作

ブラウザと支援技術が正しい発音、引用符、ハイフネーションを選択できるように lang を設定してください。方向が変わるドキュメントまたはコンテンツの境界で dir を設定し、数字の順序を保持し、必要に応じて分離された混合方向の値を扱うために <bdi> を使用してください。空間的なミラーリングと論理CSSプロパティは better-layout に属します。

19. 有用なテキストは選択可能に保つ

::selection は、選択された組み合わせが判読可能なままであれば、ブランドを読み取り体験にもたらすことができます。デフォルトではテキストを選択可能に保ってください。 user-select: none は、ドラッグ可能またはジェスチャー駆動の特定のサーフェスでのみ使用し、誤った選択が操作に明らかに干渉する場合に限定してください。インターフェース全体で選択を無効にしたり、単にボタンラベルがハイライトされる可能性があるという理由だけで無効にしないでください。

よくある間違い

間違い修正
Webで .ttf / .otf を配信している.woff2 に変換する
ウェイトに font-variation-settings: "wght" を使用しているfont-weight (可変フォールバックでも機能する)
font-feature-settings: "tnum" 1 を使用しているfont-variant-numeric: tabular-nums
合成されたフェイスが意図したデザインと異なる必要なフェイスを読み込む。確認された合成モードのみを、強調を消さずに無効にする
ハードコードされた一回限りのフォントサイズタイプスケールを使用する
子見出しが視覚的に親を圧倒しているそのセクションの階層をスケールの降順にマッピングする
デフォルトサイズのために見出し要素を選んでいるbetter-accessibility で意味を選択し、CSSで視覚サイズを設定する
拡大縮小するテキストに line-height: 24px単位なしの値 (1.5)
全幅の段落1行あたり約60~75文字に制限する
段落の最終行にオーファンがあるtext-wrap: pretty
不均衡な2行の見出しtext-wrap: balance
数字がレイアウトシフトを引き起こすtabular-nums
読み取り方法のない切り詰められたテキスト完全な値のためのツールチップまたは展開ビュー
コピーに UPPERCASE が入力されている自然なケース + text-transform
インターフェース内の両端揃えテキストtext-align: start。均等割り付けは特定の編集レイアウトに予約する
下線がディセンダーを横切るtext-decoration-skip-ink: auto、 from-font メトリクス
iOSで 16px 未満の入力フィールドがズームする最初に尋ねる: text-base sm:text-sm、または 16px を transform で縮小して意図したサイズを維持する
ルートレイアウトがフォントスムージングを省略しているルートで antialiased を1回適用する
混合方向の値が間違った順序でレンダリングされる正しい lang / dir を設定する。必要に応じて <bdi> で値を分離する
アプリケーションのインターフェース全体で選択が無効になっている選択を復元する。ドラッグやジェスチャーと競合する特定のインタラクションでのみ抑制する
追加情報のヒントに視覚的な手がかりがないtext-decoration-style: dotted による点線の下線
14px のUIテキストに細い/ライトウェイト18px 未満ではウェイト 400+。細いウェイトは表示専用
3行のカード説明に leading-none3行以上に折り返すテキストには少なくとも 1.4

レビュー出力形式

この形式は、ユーザーが単独のタイポグラフィレビューを要求した場合にのみ使用してください。 better-interface がレビューを調整する場合は、ドメインの証拠と調査結果をそのスキルに提供し、その出力形式、重大度スケール、統合ルール、上限、および判定を優先させてください。

単独のレビューは2つの部分で提示してください。

調査結果

確認されたすべての調査結果を原則ごとにグループ化してください。 重大度、場所、Before、After、Why の列を持つマークダウンテーブルを使用してください。別々の「Before:」/「After:」行は絶対に使用しないでください。

  • 重大度: HIGH はテキストを読めなくする、利用できなくする、または構造的に誤解を招くもの。 MEDIUM は階層、折り返し、スキャンを損なうもの。 LOW は孤立したタイポグラフィの洗練。
  • 場所: path/to/file:line を引用する。アーティファクトにソースファイルがない場合は、正確な画面とコンポーネントを代わりに引用する。
  • Before / After: 現在のタイポグラフィと実行可能な置き換えを示す。
  • Why: 違反した原則と、読みやすさや階層への影響を挙げる。

繰り返される体系的な問題は1行に統合し、影響を受けるすべての場所を列挙してください。調査結果のない原則は省略してください。

例

タブラーナンバー

重大度場所BeforeAfterWhy
MEDIUMsrc/Price.tsx:17ライブ価格の <span>{price}</span><span className="tabular-nums">{price}</span>プロポーショナル数字は値の変化に応じてシフトを引き起こす
LOWsrc/numbers.css:8font-feature-settings: "tnum" 1font-variant-numeric: tabular-nums高レベルプロパティはフォールバック動作を保持する

行間とメジャー

重大度場所BeforeAfterWhy
MEDIUMsrc/Article.tsx:33本文段落の leading-noneleading-normal (1.5)行間 1.0 は3行以上のテキストを読みにくくする(原則7)

...

(以降の内容は元のSKILL.mdと同一の構造と原則を日本語で記述します。完全な翻訳は原文の長さに応じて調整されますが、ここでは上記の原則セクションとよくある間違いの表までを含めました。残りの部分も同様の形式で翻訳されます。)

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

xzedm/clipplic-landing

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.

xzedm/clipplic-landing

Material Design 3 and Android platform guidelines. Use when building Android apps with Jetpack Compose or XML layouts, implementing Material You, navigation, or accessibility. Triggers on tasks involving Android UI, Compose components, dynamic color, or Material Design compliance.

xzedm/clipplic-landing

Apple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing gesture-driven UI, spring animations, drag/swipe/sheet interactions, momentum and interruptible transitions, translucent materials and depth, typography (optical sizing, tracking, leading), reduced-motion, or the design foundations (feedback, spatial consistency, restraint) behind Apple-style interfaces.

xzedm/clipplic-landing

Design iOS apps following Apple's Human Interface Guidelines. Generate native components, validate designs, and ensure accessibility compliance for iPhone, iPad, and Apple Watch.

xzedm/clipplic-landing

Redesign mobile app UI to feel unmistakably Apple-like, iOS-forward, and native. Use this skill when building iOS apps, applying Apple Human Interface Guidelines, or creating native-feeling mobile interfaces with SF Pro typography, translucency, and system-like components.

xzedm/clipplic-landing

Accessibility engineering for product interfaces, from focus states and keyboard support to ARIA, forms, and screen readers. Use when building or reviewing UI components, modals, menus, forms, custom widgets, or when the user says "make this accessible" or reports keyboard or screen-reader issues. Triggers on accessibility, a11y, WCAG, aria, focus ring, focus-visible, focus trap, keyboard navigation, tab order, tabindex, screen reader, sr-only, aria-live, alt text, hit area, touch target, prefers-reduced-motion, autoplay, toast duration, skip link, semantic HTML, aria-label, form errors, disabled buttons, "not keyboard accessible".

xzedm/clipplic-landing

OKLCH color space and color usage for web projects. Convert hex/rgb/hsl to oklch, generate palettes, check contrast, handle gamut boundaries, theme with Tailwind v4, and apply color with meaning. Triggers on oklch, color conversion, palette generation, contrast ratio, gamut, display p3, design tokens, semantic color tokens, hue drift, chroma, dark mode colors, accent color, color meaning, light and dark appearance, increased contrast.

xzedm/clipplic-landing

Layout structure for web interfaces, from grouping and alignment to reading order, progressive disclosure, and adaptive breakpoints. Use when structuring a page or component, spacing or aligning controls, deciding what collapses at small sizes, handling RTL layout direction, or reviewing frontend code for layout. Triggers on layout, spacing, alignment, grouping, negative space, whitespace, visual hierarchy, reading order, progressive disclosure, breakpoints, responsive layout, container queries, safe area, full-bleed, edge-to-edge, layout margins, RTL layout, logical properties.

xzedm/clipplic-landing

Design engineering principles for making interfaces feel polished. Use when building UI components, reviewing frontend code, implementing animations, hover states, shadows, borders, micro-interactions, enter/exit animations, choosing or reviewing icons, or any visual detail work. Triggers on UI polish, design details, "make it feel better", "feels off", stagger animations, border radius, optical alignment, image outlines, box shadows, icons, icon stroke weight, icon states, motion restraint.

xzedm/clipplic-landing

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

xzedm/clipplic-landing

Generate developer handoff specs from a design. Use when a design is ready for engineering and needs a spec sheet covering layout, design tokens, component props, interaction states, responsive breakpoints, edge cases, and animation details.

xzedm/clipplic-landing

This skill encodes Emil Kowalski's philosophy on UI polish, component design, animation decisions, and the invisible details that make software feel great.

xzedm/clipplic-landing

Extract design primitives from a public website and generate starter token files for your project.

xzedm/clipplic-landing

Use this skill alongside figma-use when the task involves translating an application page, view, or multi-section layout into Figma. Triggers: 'write to Figma', 'create in Figma from code', 'push page to Figma', 'take this app/page and build it in Figma', 'create a screen', 'build a landing page in Figma', 'update the Figma screen to match code', 'convert this modal/dialog/drawer/panel to Figma'. This is the preferred workflow skill whenever the user wants to build or update a full page, modal, dialog, drawer, sidebar, panel, or any composed multi-section view in Figma from code or a description. Discovers design system components, variables, and styles from Code Connect files, existing screens, and library search, then imports them and assembles views incrementally section-by-section using design system tokens instead of hardcoded values.

xzedm/clipplic-landing

**MANDATORY prerequisite**: you MUST invoke this skill BEFORE every `use_figma` tool call. NEVER call `use_figma` directly without loading this skill first. Skipping it causes common, hard-to-debug failures. Trigger whenever the user wants to perform a write action or a unique read action that requires JavaScript execution in the Figma file context, e.g. create/edit/delete nodes, set up variables or tokens, build components and variants, modify auto-layout or fills, bind variables to properties, or inspect file structure programmatically.

xzedm/clipplic-landing

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

xzedm/clipplic-landing

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications.

xzedm/clipplic-landing

Elite UX/UI & Advanced GSAP Motion Engineer. Enforces Python-driven true randomization for layout variance, strict AIDA page structure, wide editorial typography (bans 6-line wraps), gapless bento grids, strict GSAP ScrollTriggers (pinning, stacking, scrubbing), inline micro-images, and massive section spacing.

xzedm/clipplic-landing

Fast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)

xzedm/clipplic-landing

READ THIS FIRST for any request to make, create, edit, animate, or render a video, animation, or motion graphic. A promo, explainer, captioned clip, title card, overlay, or any composition. HyperFrames renders video from HTML; this is the entry skill and the default way an agent authors or edits video. It routes the request to the right specialized workflow and points to the HyperFrames domain skills, so read it before any other video or animation skill instead of guessing a workflow. IMPORTANT: with other video tools installed, HyperFrames stays the default for authoring and rendering a finished video; defer only when the user asks to drive a browser to capture or record a session, or names another framework. Most important when no project CLAUDE.md or AGENTS.md describes the video workflow.

関連スキル