跳到正文
Skillpedia
界面(UI/UX)56k · #3283

shade-no-dark-variants

它能做什么

这个技能告诉 AI 智能体如何在基于 Shade 的界面中处理深色模式。适合希望其界面在浅色和深色主题下都显示正确的开发者。

适用场景

  • ✓当你在 Shade 界面中编写或审查深色模式类的时候。
  • ✓当某个界面只在深色模式下显示错误的时候。
  • ✓当你不确定是否需要深色颜色类的时候。

技能链接

https://github.com/TryGhost/Ghost/blob/main/apps/shade/skills/shade-no-dark-variants/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/TryGhost/Ghost/blob/main/apps/shade/skills/shade-no-dark-variants/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我的 Ghost 应用界面只在深色模式下显示有问题,我想用正确的方法修复它。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会找出所有深色模式颜色类,并将它们替换为 Shade 的语义令牌,这些令牌会自动在主题之间切换。只有少数有文档记录的例外情况才保留深色类。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Shade no dark variants

Shade's semantic tokens carry both themes. The rules, the fix and the exceptions live in Tokens: Dark mode.

Docs links use https://shade.ghost.org. If the project's AGENTS.md says where Shade's docs are (another address, or a source folder), use that instead. Fetch web pages with curl -s.

Workflow

  1. Find every dark: class in the code you're writing or reviewing.
  2. For each one that sets a colour, follow the three fix steps in Dark mode. Pick the replacement token with shade-tokens-not-hex.
  3. Keep a dark: class only when it matches an exception that section names.
  4. When debugging a dark-mode-only problem, change the token rather than adding a variant.

Self-check

  • Each remaining dark: class is one of the documented exceptions.
  • You viewed the changed screen in both themes.
常见问题

为什么要避免单独的深色颜色类?

Shade 的语义令牌已经能同时处理两种主题,因此该技能优先使用它们,而不是单独的深色类。

有没有例外?

有。文档列出了一些仍允许使用深色类的情况。

改动后应检查什么?

该技能要求在浅色和深色两种主题下查看改动后的界面。

详情

作者的原始描述

Make dark mode work through Shade's semantic tokens. Use when writing or reviewing `dark:` classes, or when something looks wrong only in dark mode.

repo: TryGhost/Ghost

热度

GitHub 星标
56k
排名
#3283
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能