@hackcove/theme-catppuccin-mocha

中文文档
0.3.1发布于 2026/11/05MITES Module零依赖构建来源已验证近 30 天下载 5232

The Catppuccin themes for Hack Cove: Mocha (dark, theme.css) and Latte (light, latte.css), each one CSS file that remaps the Tailwind utilities @hackcove/ui-react is written against.

原始使用文档
文档目录3 节
  1. Install
  2. Use
  3. Palette and attribution

@hackcove/theme-catppuccin-mocha

The Catppuccin themes for Hack Cove, two flavours in one package. Each is one CSS file with its own scope class, and each remaps the Tailwind slate/colour utilities that @hackcove/ui-react is written against to real Catppuccin tokens. It also ships a .link class.

FlavourFileScope
Mochatheme.css.darkdark; also declares the class-based dark variant
Lattelatte.css.lattelight; declares no dark variant

Status: 0.x, published to npm. License: MIT.

Install

bun add @hackcove/theme-catppuccin-mocha
# peer: tailwindcss ^4

Use

In your global stylesheet, after Tailwind:

@import "tailwindcss";
@import "@hackcove/theme-catppuccin-mocha/theme.css";

For Latte, import latte.css instead:

@import "tailwindcss";
@import "@hackcove/theme-catppuccin-mocha/latte.css";

and put class="latte" on <html>. Import one flavour, or both and switch the class on <html>; the scopes do not overlap.

Put class="dark" on <html> for Mocha. The scope paints the mantle canvas (#181825), so the base-coloured cards lift off it and the app needs no page-background rule of its own. The rules are unlayered, so they override Tailwind's layered utilities.

The theme also owns the type faces: it sets --font-sans and --font-mono on the scope (Inter, then the system stack; the mono stack starts at ui-monospace). It ships no font file, so Inter shows only where the page loads or the machine has it. AppShell paints the canvas (bg-gray-50, which the theme remaps to mantle) and sets font-sans and the ink, so an app ships no page-background or font CSS.

Palette and attribution

The palettes are Catppuccin Mocha and Latte, © 2021 Catppuccin, used under the MIT license. The full notice ships in this package as NOTICE, and a one-line credit sits at the top of each CSS file. Tailwind's build drops that comment from a consumer's bundled CSS, so an app that wants the credit visible should add its own. This package's own license (MIT, see LICENSE) is separate.

base #1e1e2e · mantle #181825 · crust #11111b · surface0 #313244 · surface1 #45475a · surface2 #585b70 · text #cdd6f4 · subtext1 #bac2de · subtext0 #a6adc8 · overlay1 #7f849c · green #a6e3a1 · red #f38ba8 · yellow #f9e2af · blue #89b4fa · mauve #cba6f7

Latte: base #eff1f5 · mantle #e6e9ef · crust #dce0e8 · surface0 #ccd0da · text #4c4f69 · subtext1 #5c5f77 · subtext0 #6c6f85 · overlay1 #8c8fa1 · mauve #8839ef · red #d20f39 · green #40a02b · yellow #df8e1d · blue #1e66f5

Latte's accents are strong on white, so its cards are white and lift off the base canvas. Where a token alone misses the WCAG AA contrast contract (text 4.5:1, controls 3:1), latte.css darkens it just enough, and the rule's comment names the token it started from.

版本与发布记录

@hackcove/theme-catppuccin-mocha 共发布 18 个版本,首次发布于 2026/10/20;过去 12 个月发布了 18 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.3.1latest2026/11/0512 天前
0.3.02026/11/0512 天前
0.2.132026/11/0313 天前
0.2.122026/10/2919 天前
0.2.112026/10/2819 天前
0.2.102026/10/2819 天前

关于 @hackcove/theme-catppuccin-mocha 的常见问题

@hackcove/theme-catppuccin-mocha 是什么?

The Catppuccin themes for Hack Cove: Mocha (dark, theme.css) and Latte (light, latte.css), each one CSS file that remaps the Tailwind utilities @hackcove/ui-react is written against.

如何安装 @hackcove/theme-catppuccin-mocha?

在项目目录运行 npm install @hackcove/theme-catppuccin-mocha,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:tailwindcss(^4)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@hackcove/theme-catppuccin-mocha 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/hackcove__theme-catppuccin-mocha 是否存在。

@hackcove/theme-catppuccin-mocha 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@hackcove/theme-catppuccin-mocha 可以商用吗?

@hackcove/theme-catppuccin-mocha 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@hackcove/theme-catppuccin-mocha 的下载量有多少?

根据 npm 官方下载统计,@hackcove/theme-catppuccin-mocha 在 2026/10/17 – 2026/11/15 这 30 天内被下载 5,232 次,日均约 174 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@hackcove/theme-catppuccin-mocha 还在维护吗?

最新版本 0.3.1 发布于 2026/11/05(12 天前);至今共发布 18 个版本,其中过去 12 个月发布了 18 个;首次发布于 2026/10/20。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。