Use this skill when designing, reviewing, or generating CSS for typography in Japanese or multilingual interfaces. Apply it for font family, text wrapping, kerning, line height, fluid type, truncation, manual line breaks, and related text layout decisions.
Ships in kf-global. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
この skill は、tak-dcxi の Typography gist をもとに、日本語中心または多言語 UI のタイポグラフィ実装判断を揃えるためのものです。
kiso.css を採用している前提で整理し、未採用の場合は必要な reset を @layer reset へ移植する前提で使います。
font-family や font-weight の方針を決めるときtext-wrap, font-kerning, font-feature-settings, text-autospace などの使い分けを決めるときline-height, text-box-trim, hanging-punctuation, line-clamp をレビューするときclamp() を使った流体タイポグラフィや px / rem の使い分けを決めるときoverflow-wrap, line-break, text-autospace, text-spacing-trim, 日本語向けの font-style リセットなど、必要な reset を @layer reset へ移植するhyphens, font-kerning, text-wrap, 日本語向けの例外処理は lang 属性が付いていることを前提にする@layer reset, @layer base, @layer utilities のどこへ置くべきか@layer resettext-autospace と text-spacing-trim は reset で全体方針を敷くem, cite, dfn などの斜体解除も reset で扱う@layer basefont-kerning は base に置くfont-feature-settings: "palt" や英語見出しの text-wrap: balance は base で与えるline-height や太字トークンも base でそろえる@layer utilities-fluid-text, -text-center, -trim-both, -kerning, -auto-phrase, -hanging, -tabular-nums, -uppercase, -hyphens, -line-clamp, -br, -wbr であるfont-familyfont-family: sans-serif のみで良いsystem-ui を安易に使わない。Windows では游ゴシック系 UI 書体が前に出やすく、意図しない見た目になりやすいsystem-ui が入る仕組みは必ず点検する@font-face でローカルフォントを優先し、二重読み込みを避けるfont-style と font-weightem, cite, dfn, i, address の斜体を前提にしない:lang(ja) に限定して斜体解除と em の太字化を reset で補うfont-weight はキーワードより数値指定を優先し、--font-bold: 700 のようなトークンに寄せるoverflow-wrap: anywhere と line-break: strict を前提にするtext-align: center を使う場合は text-wrap: balance をセットで考えるtext-wrap: pretty、英語見出しは text-wrap: balance を基本にするtext-wrap を基本入れない。ベタ組みを崩しやすいためword-break: auto-phrase と text-wrap: balance の組み合わせを第一候補にし、対応ブラウザだけへ段階適用するtext-wrap: pretty が崩れやすいため、現状では避けるinline-size: round(down, 100%, 1ic) を検討する:lang(en) には font-kerning: normal を与える:lang(ja) には font-kerning: none を既定にし、日本語本文のベタ組みを優先するfont-kerning: normal を与えるfont-feature-settings: "palt" を使う。縦書きでは vpal を使うfont-feature-settings: "pwid" を使う場面では、上位互換の font-variant-east-asian: proportional-width を優先するfont-variant-numeric: tabular-nums を使うtext-autospace: normal を全体方針にするpre, time, input, textarea, [contenteditable] には text-autospace: no-autospace を明示するtext-spacing-trim: trim-start を既定にし、pre だけ space-all を明示するline-height は 1.5 以上にするline-height は unitless number を使い、トークン化するtext-box-trim / text-box-edge を検討するtext-box-trim はプログレッシブ・エンハンスメントとして使う。英語では text-box-edge: cap alphabetic、日本語では既定値 text を優先するmargin-block: calc((1em - 1lh) / 2) を追加検討するhanging-punctuation は段落でのみ使うhanging-punctuation: first allow-end last、日本語では last allow-end を基準にするline-clamp はプレフィックス付きで実装する。display: -webkit-box と -webkit-box-orient と -webkit-line-clamp をセットにするoverflow: hidden ではなく overflow-block: clip を第一候補にするoverflow-y: clip を使う。overflow: hidden は sticky や約物ぶら下げを壊しやすいhyphens: auto は lang="en" などの言語明示がある時だけ使うtext-transform: uppercase のユーティリティで扱うrole="note" を付け、text-indent: hanging 1ic を使うword-break: auto-phrase は日本語見出し、キャプション、短文などに限定する<br> を増やさないdisplay: contents と display: inline flow-root / block flow を使って CSS で改行させる‍ で結び、意図を明示するfont-size をクエリで刻む前に clamp() を検討する100svi、コンポーネントローカルで変えるなら 100cqi を使う100cqi は有効なコンテナが保証される場合だけ使う。単位判断はレスポンシブ skill の規約も参照するrem と px は役割で使い分けるrem / em を優先するpx を検討するrem を使うならブラウザの文字拡大機能を有効にして検証する:where(:lang(en)) {
font-kerning: normal;
}
:where(:lang(ja)) {
font-kerning: none;
}
:where(h1, h2, h3, h4, h5, h6, caption) {
font-kerning: normal;
&:lang(en) {
text-wrap: balance;
}
&:lang(ja) {
font-feature-settings: "palt";
@supports (word-break: auto-phrase) {
word-break: auto-phrase;
text-wrap: balance;
}
}
}
:where(p:lang(en)) {
text-wrap: pretty;
}
.-fluid-text {
--_u-relative-max-width: var(--fluid-text--relative-max-width, 1280);
--_u-relative-min-width: var(--fluid-text--relative-min-width, 375);
--_u-min-font-size: var(--fluid-text--min-font-size, 14);
--_u-max-font-size: var(--fluid-text--max-font-size, 16);
--_u-base-font-size: var(--fluid-text--base-font-size, 16);
--_u-relative-unit: var(--fluid-text--relative-unit, 100svi);
--_u-fluid-slope: calc(
(var(--_u-max-font-size) - var(--_u-min-font-size)) /
(var(--_u-relative-max-width) - var(--_u-relative-min-width))
);
--_u-fluid-intercept: calc(
var(--_u-min-font-size) - var(--_u-fluid-slope) *
var(--_u-relative-min-width)
);
font-size: clamp(
var(--_u-min-font-size) / var(--_u-base-font-size) * 1rem,
var(--_u-fluid-slope) * var(--_u-relative-unit) + var(--_u-fluid-intercept) /
var(--_u-base-font-size) * 1rem,
var(--_u-max-font-size) / var(--_u-base-font-size) * 1rem
);
}
.-text-center {
text-align: center;
text-wrap: balance;
}
.-trim-both {
text-box-trim: trim-both;
&:lang(en) {
text-box-edge: cap alphabetic;
}
}
.-kerning {
font-kerning: normal;
&:lang(ja) {
font-feature-settings: "palt";
}
}
.-auto-phrase {
&:lang(ja) {
@supports (word-break: auto-phrase) {
word-break: auto-phrase;
text-wrap: balance;
}
}
}
.-hanging {
hanging-punctuation: last allow-end;
&:lang(en) {
hanging-punctuation: first allow-end last;
}
}
.-tabular-nums {
font-variant-numeric: tabular-nums;
}
.-uppercase {
text-transform: uppercase;
}
.-hyphens {
hyphens: auto;
}
.-line-clamp {
display: -webkit-box;
overflow-block: clip;
-webkit-box-orient: block-axis;
-webkit-line-clamp: var(--line-clamp--limit, 3);
@supports not (overflow-block: clip) {
overflow-y: clip;
}
}
.-br {
display: contents;
&:lang(ja) {
display: block flow;
}
}
.-wbr {
display: contents;
&:lang(ja) {
display: inline flow-root;
}
}
font-kerning, text-wrap, text-box-trim, word-break: auto-phrase を使う場合は、ブラウザ差分とトレードオフを短く添えるline-clamp, 手動改行、注釈の字下げでは、必要なら CSS だけでなくマークアップ要件も併記するrem と px を選ぶ時は、文字拡大に追従すべきかどうかを判断理由として示すlang 属性が付いているかsystem-ui を安易に使っていないかtext-align: center と text-wrap: balance を切り離していないかtext-wrap を入れていないかline-clamp で overflow: hidden を安易に使っていないかhyphens: auto に言語明示があるかrem と px の使い分けに理由があり、文字拡大で検証したかWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
14 skills in this plugin
/kf-g-artifacts-creation-rulesMandatory authoring and workflow rules for creating artifacts (HTML documents, reports, specs, visual summaries, and standalone deliverables). Always use this skill before drafting, revising, or archiving any artifact to follow the visual-first layout with diagrams/tables/screenshots, plain high-school-level Japanese vocabulary, short concise sentences, and the local HTML artifact workflow (~/artifacts placement, sequential filename reservation, Tailscale viewer URL linking, and post-task archiving)./kf-g-artifacts-sanitizeUse this skill when creating artifacts. Apply it to revise those artifacts so they read as natural, standalone deliverables and do not leak prompt instructions, conversation history, implementation constraints, or production-process traces./kf-g-css-flex-grid/kf-global:kf-g-css-tak-typographyfrom kf-global
npx claudepluginhub melumuccu/ai --plugin kf-global