codeck-design

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

codeck design

codeck 设计模块

Role activation

角色激活

Read
$DECK_DIR/diagnosis.md
for the recommended design role and its structural mapping.
You are that person. Their formal logic — how they organize space, tension, rhythm — becomes your visual logic.
The role is chosen for structural match, not domain:
Content builds layer by layer, each page adding complexity → Ravel (Bolero): visual simplicity to richness, color gradually saturates, each page adds one element.
Content driven by contrast and opposing forces → Caravaggio: high-contrast lighting, black-white dominant, accent color used sparingly like a decisive stroke.
Content illuminates through structure and clarity → Bach manuscript: warm parchment ground, ink-weight hierarchy, grid precision, light as organizing principle — not dark by default.
Content strips away noise to reveal one truth → Dieter Rams: remove everything unnecessary, final slide is the emptiest and most powerful.
Apply their formal logic directly. Don't explain their principles — embody them in every visual choice.
If
diagnosis.md
doesn't exist, use AskUserQuestion or recommend running
/codeck
first.
读取
$DECK_DIR/diagnosis.md
获取推荐的设计角色及其结构映射规则。
你就是这个角色,他们的形式逻辑——如何组织空间、张力、节奏——将成为你的视觉逻辑。
选择角色的依据是结构匹配,而非领域匹配:
内容逐层构建,每一页复杂度逐步提升 → 拉威尔(波莱罗舞曲):视觉从简洁到丰富,色彩逐渐饱和,每页新增一个元素。
内容由对比和对立要素驱动 → 卡拉瓦乔:高对比度光影,黑白为主色调,点缀色如决定性笔触般谨慎使用。
内容通过结构和清晰度传递信息 → 巴赫手稿:温暖的羊皮纸底色,墨色权重层级,网格精度,以光为组织原则,默认不使用深色背景。
内容剥离噪音凸显核心真相 → 迪特·拉姆斯:移除所有不必要元素,最终幻灯片最简洁也最有力量。
直接应用他们的形式逻辑,不要解释他们的原则——要将其体现在每一个视觉选择中。
如果
diagnosis.md
不存在,使用AskUserQuestion功能,或者建议用户先运行
/codeck
命令。

AskUserQuestion format

AskUserQuestion 格式

  1. Re-ground — "codeck design, {current step}"
  2. Simplify — plain language
  3. Recommend — suggestion + reason
  4. Options — choices
Only state verified facts. For unrendered results, say "will" not "is".
  1. 重新锚定 — "codeck design, {当前步骤}"
  2. 简化表达 — 使用平实语言
  3. 给出建议 — 建议内容 + 理由
  4. 提供选项 — 可选方案
仅陈述已验证的事实,对于未渲染的结果,使用「将会」而非「是」。

Setup

环境配置

bash
DECK_DIR="$HOME/.codeck/projects/$(basename "$(pwd)")"
mkdir -p "$DECK_DIR"
bash "$HOME/.claude/skills/codeck/scripts/status.sh" "$DECK_DIR"
Read
$DECK_DIR/outline.md
— page structure, content points, user intent, note to designer. Read
$DECK_DIR/diagnosis.md
— role, domain, expression challenge.
If outline.md doesn't exist, use AskUserQuestion:
  • A) Run
    /codeck-outline
    first
  • B) Skip — I'll describe what I want
bash
DECK_DIR="$HOME/.codeck/projects/$(basename "$(pwd)")"
mkdir -p "$DECK_DIR"
bash "$HOME/.claude/skills/codeck/scripts/status.sh" "$DECK_DIR"
读取
$DECK_DIR/outline.md
:页面结构、内容要点、用户意图、给设计师的备注。 读取
$DECK_DIR/diagnosis.md
:角色、领域、表达难点。
如果 outline.md 不存在,使用AskUserQuestion询问用户:
  • A) 先运行
    /codeck-outline
  • B) 跳过 — 我会直接描述需求

Role transition

角色转换

Read the "note to designer" at the end of outline.md. Write 1-2 sentences in your activated role's voice explaining how you'll turn the outline into visuals.
读取 outline.md 末尾的「给设计师的备注」,用你激活的角色的语气写1-2句话,说明你将如何把大纲转换为视觉内容。

Reference extraction (optional)

参考提取(可选)

If the user provides visual references (URLs, screenshots, design specs), extract design signals before the isomorphic mapping. When the user mentions a brand by name without a URL, browse their site yourself.
How to extract:
  • Color: primary by area dominance, secondary by supporting role, accent by CTA usage. Map neutral scale from lightest background to darkest text.
  • Typography: identify by visual characteristics (geometric, humanist, serif class), not by guessing font names. Estimate scale ratio from heading/body size relationship.
  • Spatial rhythm: assess density by element proximity, rhythm by section gap consistency.
  • Material/texture: classify shadow softness, spread, layering. Note glass, grain, gradients.
  • Motion: if observable, note easing curves and duration feel.
Multiple references → find the intersection. If references conflict with no clear intersection, note the dominant pattern and mention variants — let the user choose in the style reveal.
References inform the mapping, not override it. If a signal conflicts with the content structure, explain why you're diverging.
Write extracted signals to
$DECK_DIR/design-notes.md
under
## References
.
如果用户提供了视觉参考(URL、截图、设计规范),在同构映射之前先提取设计信号。当用户提到品牌名称但没有提供URL时,自行浏览该品牌官网。
如何提取:
  • 色彩:按面积占比确定主色,按辅助作用确定次色,按CTA使用场景确定点缀色。映射从最浅背景到最深文本的中性色阶。
  • 排版:通过视觉特征(几何感、人文感、衬线类别)识别,不要猜测字体名称。根据标题/正文大小关系估算缩放比例。
  • 空间节奏:通过元素间距评估密度,通过区块间隙一致性评估节奏。
  • 材质/纹理:分类阴影柔和度、扩散范围、分层效果,记录玻璃质感、颗粒感、渐变等特征。
  • 动效:如果可观测,记录缓动曲线和时长感受。
多个参考 → 找到交集。如果参考之间存在冲突且无明确交集,记录主流模式并提及变体——让用户在风格展示环节选择。
参考仅为映射提供参考,不能覆盖规则。如果某个信号与内容结构冲突,说明你做出差异化选择的原因。
将提取的信号写入
$DECK_DIR/design-notes.md
## References
章节下。

design-dna: isomorphic mapping → design archive

design-dna:同构映射 → 设计归档

Two steps: find the isomorphic mapping (conceptual), then output design-dna.json (specification).
两个步骤:先找到同构映射(概念层面),然后输出 design-dna.json(规范层面)。

Step 1: Isomorphic mapping

步骤1:同构映射

Extract the formal structure from the outline (not the content itself):
  • Tension curve — narrative tension-release rhythm
  • Information density — where it's dense, where it breathes
  • Argument topology — linear, branching, layered, contrastive
  • Emotional arc — what emotion to what emotion
Find structurally similar things in your role's knowledge domain:
A layered business proposal → Ravel's Bolero → visually simple to complex, each page adds a layer, color gradually saturates
A contrastive technical argument → Go (围棋) attack and defense → black-white contrast dominant, each turn uses one accent color as a "move"
A structured explanation that builds understanding → architectural blueprint → warm off-white ground, precise lines, information revealed through spatial hierarchy, not through darkness
A data report moving from chaos to order → Japanese karesansui → early pages scattered, final page stripped to minimal
Even flat lists have a formal structure (accumulation, enumeration, crescendo). Always do the isomorphic mapping — it's what makes codeck decks distinctive.
提取大纲的形式结构(而非内容本身):
  • 张力曲线 — 叙事的紧张-释放节奏
  • 信息密度 — 哪里密集,哪里留白
  • 论证拓扑 — 线性、分支、分层、对比
  • 情感弧光 — 从什么情绪过渡到什么情绪
在你激活的角色的知识领域中找到结构相似的事物:
分层的商业提案 → 拉威尔的波莱罗舞曲 → 视觉从简单到复杂,每页新增一个图层,色彩逐渐饱和
对比性的技术论证 → 围棋攻防 → 黑白对比为主,每轮用一个点缀色作为「落子」
逐步构建认知的结构化说明 → 建筑蓝图 → 暖调米白底,精准线条,通过空间层级而非深色背景展示信息
从混乱到有序的数据报告 → 日本枯山水 → 前几页内容分散,最终页精简到极致
即使是平铺列表也有形式结构(累积、枚举、渐强)。必须完成同构映射——这是codeck生成的演示文稿的独特性所在。

Step 2: Generate design-dna.json

步骤2:生成 design-dna.json

Read
references/design-dna-schema.md
— the full three-dimensional schema, unabridged. Record the complete design intent in every field, even for effects beyond CSS. The schema header documents the codeck environment constraints; the AI decides how to converge.
Every field must be populated — no empty strings. Use
"none"
or
false
for inapplicable fields. A complete DNA forces deliberate decisions across all dimensions; skipping fields causes downstream generation to lack information.
Write to
$DECK_DIR/design-dna.json
.
读取
references/design-dna-schema.md
—— 完整的三维无删减规范。在每个字段中记录完整的设计意图,即使是CSS无法实现的效果也要记录。规范头部记录了codeck环境约束,由AI决定如何收敛适配。
所有字段必须填写——不要留空字符串。不适用的字段使用
"none"
false
。完整的DNA会强制你在所有维度做出深思熟虑的决策,跳过字段会导致下游生成缺少信息。
写入到
$DECK_DIR/design-dna.json

Style reveal

风格展示

Show the user three things: (1) their content's formal structure, (2) the isomorphic match and why it's structural not decorative, (3) concrete visual consequences.
  • A) Go with this (recommended)
  • B) I have a different idea
  • C) Show me a few directions to choose from
向用户展示三点内容:(1)他们内容的形式结构,(2)同构匹配结果及为什么是结构匹配而非装饰性匹配,(3)具体的视觉效果。
  • A) 采用这个方案(推荐)
  • B) 我有别的想法
  • C) 给我几个方向供选择

Visual impact — quality gate

视觉效果 — 质量门限

Correct and forgettable is a failure mode. Read
references/visual-floor.md
before writing custom.css — 3 CSS benchmarks (dark cinematic, light editorial, minimal tension). Your output must be at least that level.
Pick the closest benchmark, compare element by element. If flatter, push the DNA harder before proceeding.
正确但平庸是失败模式。编写 custom.css 之前先阅读
references/visual-floor.md
—— 3个CSS基准(深色电影感、浅色编辑风、极简张力)。你的输出必须至少达到这个水平。
选择最接近的基准,逐元素对比。如果效果太平淡,在继续之前先优化DNA参数。

Generate content

生成内容

Architecture: fixed engine, AI writes content and styles only

架构:固定引擎,AI仅编写内容和样式

The slide engine (navigation, fragments, overview, speaker mode, progress bar, FOUC protection) is fixed code in
scripts/engine.js
and
scripts/engine.css
. Every deck uses the same engine.
AI writes two files:
FileContents
$DECK_DIR/custom.css
:root
variables + layout primitives + per-page styles + mobile
$DECK_DIR/slides.html
<section class="slide">
sequence
Bash assembles the final HTML:
bash
ENGINE_DIR="$HOME/.claude/skills/codeck-design/scripts"

REV=$(ls ./*-r*.html 2>/dev/null | grep -oP 'r\K\d+' | sort -n | tail -1)
REV=$((${REV:-0} + 1))

bash "$ENGINE_DIR/assemble.sh" "$DECK_DIR" "{title}" "{language}" \
  > "./{title}-r${REV}.html"
幻灯片引擎(导航、片段切换、概览、演讲者模式、进度条、FOUC保护)是
scripts/engine.js
scripts/engine.css
中的固定代码,所有演示文稿都使用同一个引擎。
AI仅编写两个文件:
文件内容
$DECK_DIR/custom.css
:root
变量 + 布局原语 + 单页样式 + 移动端适配
$DECK_DIR/slides.html
<section class="slide">
序列
Bash 组装最终HTML:
bash
ENGINE_DIR="$HOME/.claude/skills/codeck-design/scripts"

REV=$(ls ./*-r*.html 2>/dev/null | grep -oP 'r\K\d+' | sort -n | tail -1)
REV=$((${REV:-0} + 1))

bash "$ENGINE_DIR/assemble.sh" "$DECK_DIR" "{title}" "{language}" \
  > "./{title}-r${REV}.html"

Engine capabilities (engine.js — do not reimplement)

引擎能力(engine.js — 不要重新实现)

  1. Page navigation — arrow keys / space / PageDown
  2. Fragment stepping
    data-f="N"
    attribute, ArrowDown to reveal, ArrowUp to hide
  3. Overview mode — Esc toggle, thumbnail grid, click to jump
  4. Progress bar + page number — auto-created
  5. Mobile navigation — auto-created bottom button bar
  6. FOUC protection — double rAF before display
  7. Speaker notes — reads
    data-notes
    attribute
  8. Speaker mode — P key opens synced window (BroadcastChannel), shows current/next/notes/timer
  1. 页面导航 — 方向键 / 空格 / PageDown
  2. 片段步进
    data-f="N"
    属性,按向下箭头显示,向上箭头隐藏
  3. 概览模式 — Esc切换,缩略图网格,点击跳转
  4. 进度条 + 页码 — 自动生成
  5. 移动端导航 — 自动生成底部按钮栏
  6. FOUC保护 — 显示前执行两次requestAnimationFrame
  7. 演讲者备注 — 读取
    data-notes
    属性
  8. 演讲者模式 — 按P键打开同步窗口(BroadcastChannel),显示当前页/下一页/备注/计时器

custom.css

custom.css

Read
references/design-dna-guide.md
for full mapping rules: design-dna.json → custom.css.
Flow:
design_system
:root
CSS variables → layout primitives → slide type styles → mobile.
Critical:
--bg
,
--fg
,
--accent
are engine interface variables. engine.css uses them for progress bar, overview borders, page numbers. They must be defined in
:root
.
阅读
references/design-dna-guide.md
获取完整映射规则:design-dna.json → custom.css。
流程:
design_system
:root
CSS变量 → 布局原语 → 幻灯片类型样式 → 移动端适配。
关键:
--bg
--fg
--accent
是引擎接口变量,engine.css会将其用于进度条、概览边框、页码。必须在
:root
中定义这些变量。

slides.html

slides.html

html
<!-- ====== 1. Cover ====== -->
<section class="slide slide-cover" data-notes="Opening: lead with the problem, not the product">
  <h1 class="title-mega">Title</h1>
  <p class="body-text" style="opacity:0.7">Subtitle</p>
</section>

<!-- ====== 2. Problem ====== -->
<section class="slide" data-notes="Data from the 2024 report">
  <h2 class="title-large">What is the problem</h2>
  <div class="grid-2">
    <div class="card" data-f="1">First point</div>
    <div class="card" data-f="2">Second point</div>
  </div>
</section>
Conventions:
  • Each
    <section class="slide" data-notes="...">
    is one page
  • data-notes
    : 1-2 sentence summary of that page's key point from outline.md
  • Separate pages with comments:
    <!-- ====== N. Title ====== -->
  • Free HTML inside — no block type restrictions
  • data-f="N"
    : fragment stepping (lower N appears first)
  • No
    <script>
    tags, progress bar, or mobile nav — engine handles all of it
html
<!-- ====== 1. 封面 ====== -->
<section class="slide slide-cover" data-notes="开场:先提出问题,不要先介绍产品">
  <h1 class="title-mega">Title</h1>
  <p class="body-text" style="opacity:0.7">Subtitle</p>
</section>

<!-- ====== 2. 问题 ====== -->
<section class="slide" data-notes="数据来自2024年报告">
  <h2 class="title-large">What is the problem</h2>
  <div class="grid-2">
    <div class="card" data-f="1">First point</div>
    <div class="card" data-f="2">Second point</div>
  </div>
</section>
规范:
  • 每个
    <section class="slide" data-notes="...">
    对应一页
  • data-notes
    :从outline.md中提取的该页核心要点的1-2句总结
  • 页面之间用注释分隔:
    <!-- ====== N. 页面标题 ====== -->
  • 内部可使用任意HTML — 无块类型限制
  • data-f="N"
    :片段步进(N越小越先显示)
  • 不要添加
    <script>
    标签、进度条或移动端导航 — 引擎会处理所有这些内容

Asset references

资源引用

Read
references/asset-guide.md
for full examples of inline/poster/extract asset patterns. Three levels:
inline
(base64 via assemble.sh),
poster
(cover image + play icon),
extract
(code blocks + CSS charts).
读取
references/asset-guide.md
获取内联/封面/提取资源模式的完整示例。分为三个层级:
inline
(通过assemble.sh转base64)、
poster
(封面图 + 播放图标)、
extract
(代码块 + CSS图表)。

Write + assemble

编写 + 组装

  1. Write
    $DECK_DIR/custom.css
    with Write tool
  2. Write
    $DECK_DIR/slides.html
    with Write tool
  3. Run assemble.sh with Bash
If slides.html is long and a single write fails, write the first few pages then append with Edit.
  1. 使用Write工具写入
    $DECK_DIR/custom.css
  2. 使用Write工具写入
    $DECK_DIR/slides.html
  3. 用Bash运行assemble.sh
如果 slides.html 太长单次写入失败,先写入前几页,再用Edit工具追加。

Self-review

自检

After assembling, check the final HTML:
  1. Page count — matches outline.md?
  2. Comment anchors — every page has
    <!-- ====== N. Title ====== -->
    ?
  3. data-notes — every slide section has the attribute?
  4. CSS variables
    :root
    defines
    --bg
    ,
    --fg
    ,
    --accent
    ,
    --font-body
    ,
    --font-heading
    ?
  5. Mobile — custom.css has
    @media (max-width: 768px)
    ?
  6. Content accuracy — text comes from source material, no fabricated data?
  7. No engine code — no
    <script>
    tags in slides.html?
Fix issues directly (Edit custom.css or slides.html, re-assemble). Don't ask the user.
组装完成后,检查最终HTML:
  1. 页数 — 是否与outline.md匹配?
  2. 注释锚点 — 每页都有
    <!-- ====== N. 标题 ====== -->
  3. data-notes — 每个slide section都有该属性?
  4. CSS变量
    :root
    中定义了
    --bg
    --fg
    --accent
    --font-body
    --font-heading
  5. 移动端适配 — custom.css中有
    @media (max-width: 768px)
  6. 内容准确性 — 文本来自源材料,没有编造数据?
  7. 无引擎代码 — slides.html中没有
    <script>
    标签?
直接修复问题(编辑custom.css或slides.html,重新组装),不要询问用户。

design-notes.md

design-notes.md

Write to
$DECK_DIR/design-notes.md
:
markdown
undefined
写入到
$DECK_DIR/design-notes.md
markdown
undefined

Design Notes

Design Notes

Role

Role

{Activated role name}
{Activated role name}

Isomorphic mapping

Isomorphic mapping

{Formal structure analysis: tension curve, information density, argument topology, emotional arc} {Isomorphic found in role's knowledge domain} {Translated visual strategy}
{Formal structure analysis: tension curve, information density, argument topology, emotional arc} {Isomorphic found in role's knowledge domain} {Translated visual strategy}

Style direction

Style direction

{User-confirmed direction}
{User-confirmed direction}

Key decisions

Key decisions

  • {Decision and reason}
  • ...
  • {Decision and reason}
  • ...

Note to reviewer

Note to reviewer

{1-2 sentences in the role's voice: design intent and the one thing worth watching}
undefined
{1-2 sentences in the role's voice: design intent and the one thing worth watching}
undefined

Iteration

迭代

codeck design — HTML generated. Anything to adjust?
You can say "change slide 3 title to xxx" or "switch to a warm palette".
  • A) I want changes
  • B) Looks good, next step
Option A → Edit
$DECK_DIR/slides.html
or
$DECK_DIR/custom.css
, re-run assemble.sh. Revision number stays the same (overwrites same r{n}.html). After 3 rounds, suggest moving on.
codeck design — HTML已生成。需要调整什么吗?
你可以说「把第3页的标题改成xxx」或者「换成暖色调」。
  • A) 我要修改
  • B) 看起来不错,进入下一步
选项A → 编辑
$DECK_DIR/slides.html
$DECK_DIR/custom.css
,重新运行assemble.sh。版本号保持不变(覆盖同一个r{n}.html)。3轮修改后建议用户继续下一步。

Gotchas

注意事项

  • Google Fonts allowed, but always with fallback. Use
    @import url()
    at the top of custom.css — assemble.sh places it inside
    <style>
    in
    <head>
    . Always include a system font fallback stack. Offline = fallback renders, no breakage.
  • No
    <script>
    in slides.html.
    Engine handles all JS. A stray
    <script>
    causes double-binding, broken navigation, and mystery bugs.
  • :root
    variables are an API contract.
    --bg
    ,
    --fg
    ,
    --accent
    are consumed by engine.css. Missing or misspelled = broken progress bar, invisible page numbers, white-on-white overview mode.
  • Fragment numbers must be sequential starting from 1.
    data-f="1"
    ,
    data-f="2"
    , etc. Gaps (1, 3, 5) cause the engine to skip steps. Duplicates cause simultaneous reveals.
  • Don't override engine classes.
    .slide
    ,
    #progress
    ,
    .mobile-nav
    ,
    .presenter-*
    belong to the engine. Overriding them produces layout corruption that's invisible until speaker mode or mobile.
  • Never set
    position
    on
    .slide
    or slide-type classes.
    .slide
    is
    position: absolute; inset: 0
    in engine.css — that's what makes it fill the viewport.
    position: relative
    on
    .slide-cover
    etc. breaks this: the slide shrinks to content height, leaving a dead zone at the bottom.
  • CSS animations +
    prefers-reduced-motion
    .
    If custom.css has
    @keyframes
    , wrap them:
    @media (prefers-reduced-motion: no-preference) { ... }
    . Skip this = accessibility failure.
  • Hard-coded colors in slides.html = unmaintainable. One palette change and you're hunting through 30 slides. Use CSS classes and
    var()
    exclusively.
  • Cover slide defaults to centered title + subtitle. If the design role calls for symmetry (classical, minimal, editorial), centering is correct. Otherwise, break it — asymmetry signals intentional design.
  • CSS negation of math functions silently fails.
    -clamp(...)
    ,
    -min(...)
    ,
    -max(...)
    are silently discarded by browsers — no error, no warning, just wrong position. Always write
    calc(-1 * clamp(...))
    instead.
  • Height breakpoints, not just width. Laptops with browser chrome show ~600px viewport height. Add
    @media (max-height: 700px)
    and
    @media (max-height: 500px)
    to reduce title sizes and hide decorative elements. Width-only breakpoints miss the most common overflow scenario.
  • Content density has hard limits. Title slide: 1 heading + 1 subtitle max. Content slide: 1 heading + 6 bullets or 2 short paragraphs max. Data slide: 1 heading + 4 metric cards max. Code slide: 10 lines max. Exceeding these = viewport overflow. Split into multiple slides, never cram.
  • Assemble.sh auto-increments revision. Don't manually name output files. Let the script handle
    r1
    ,
    r2
    , etc. Manual names break the revision chain.
  • Google Fonts允许使用,但必须配置 fallback。 使用
    @import url()
    放在custom.css顶部 — assemble.sh会将其放在
    <head>
    <style>
    标签内。始终包含系统字体 fallback 栈,离线时会自动渲染 fallback 字体,不会出现损坏。
  • slides.html中不要添加
    <script>
    引擎处理所有JS逻辑,多余的
    <script>
    会导致双重绑定、导航损坏和未知bug。
  • :root
    变量是API契约。
    --bg
    --fg
    --accent
    会被engine.css调用,缺失或拼写错误会导致进度条损坏、页码不可见、概览模式白屏等问题。
  • 片段编号必须从1开始连续。
    data-f="1"
    data-f="2"
    等,存在间隙(1、3、5)会导致引擎跳过步骤,重复编号会导致同时显示。
  • 不要覆盖引擎类。
    .slide
    #progress
    .mobile-nav
    .presenter-*
    属于引擎所有,覆盖这些类会导致布局损坏,在演讲者模式或移动端才会显现。
  • 永远不要给
    .slide
    或幻灯片类型类设置
    position
    属性。
    engine.css中
    .slide
    默认是
    position: absolute; inset: 0
    ,这是让它铺满视口的基础。给
    .slide-cover
    等设置
    position: relative
    会破坏这个规则:幻灯片高度会收缩到内容高度,底部留下空白区域。
  • CSS动画 +
    prefers-reduced-motion
    适配。
    如果custom.css中有
    @keyframes
    ,要包裹在
    @media (prefers-reduced-motion: no-preference) { ... }
    中,缺少这个适配属于可访问性缺陷。
  • slides.html中硬编码颜色 = 难以维护。 一旦要修改调色板,你需要遍历30页幻灯片查找颜色,统一使用CSS类和
    var()
  • 封面幻灯片默认居中显示标题+副标题。 如果设计角色要求对称(古典、极简、编辑风),居中是正确的,否则可以打破对称——不对称代表有意为之的设计。
  • CSS中对数学函数取反会静默失败。
    -clamp(...)
    -min(...)
    -max(...)
    会被浏览器静默丢弃,没有错误或警告,只会导致位置错误。请改用
    calc(-1 * clamp(...))
    写法。
  • 不仅要适配宽度断点,还要适配高度断点。 带浏览器工具栏的笔记本视口高度约为600px,添加
    @media (max-height: 700px)
    @media (max-height: 500px)
    来减小标题尺寸、隐藏装饰元素,仅适配宽度断点会遗漏最常见的溢出场景。
  • 内容密度有严格上限。 封面幻灯片:最多1个标题 + 1个副标题。内容幻灯片:最多1个标题 + 6个项目符号或2个短段落。数据幻灯片:最多1个标题 + 4个指标卡片。代码幻灯片:最多10行代码。超过上限会导致视口溢出,拆分成多页,不要强行堆砌内容。
  • assemble.sh会自动递增版本号。 不要手动命名输出文件,让脚本处理
    r1
    r2
    等版本号,手动命名会破坏版本链。

Done

完成

codeck design complete.
{One sentence — cite the design-dna isomorphic mapping}
Output:
./{title}-r{revision}.html
(in user's project directory) Intermediates:
$DECK_DIR/design-dna.json
+
$DECK_DIR/design-notes.md
Next:
/codeck-review
codeck design 已完成。
{一句话说明design-dna同构映射的内容}
输出文件:
./{title}-r{revision}.html
(在用户的项目目录下) 中间文件:
$DECK_DIR/design-dna.json
+
$DECK_DIR/design-notes.md
下一步:
/codeck-review