Driftless

inspired

夜柠 Night Lime

炭黑底上的一抹酸绿,像夜间播放列表。

什么是 DESIGN.md

适合: 音乐、媒体、夜间消费 App

不适合: 印刷出版、日光办公工具

三步交给 Agent

  1. 1复制下面的 DESIGN.md。
  2. 2放到仓库根目录。
  3. 3在 Cursor、Claude Code、Codex 或 Stitch 的规则里点名它。

一行安装

在仓库根目录执行。npm 上的 driftless 是别人的计时库。带 --skill 会同时写入 Cursor 和 Claude 的技能目录。

npx driftless-styles add night-lime
npx driftless-styles add night-lime --skill

MCP 配置

{
  "mcpServers": {
    "driftless": {
      "command": "npx",
      "args": ["-y", "driftless-mcp"]
    }
  }
}
用这套风格开始

夜柠歌单

Specimen

The quick brown fox

primary
secondary
tertiary
background
surface
outline
muted
success
warning
error
onPrimary
onSecondary
onTertiary
onBackground
onSurface
h1 — Design systems for agents
h2 — Design systems for agents
h3 — Design systems for agents
body — Design systems for agents
label — Design systems for agents
caption — Design systems for agents
mono — Design systems for agents
PrimarySecondaryCard

要做

  • 组件里用语义色 token,不要写死 hex。
  • 只留一个强调色;层级靠字重和留白。
  • 写清默认、悬停、焦点、按下、禁用和加载状态。
  • 正文和可交互标签达到 WCAG 2.2 AA 对比度。
  • 触控区域在 iOS 至少 44×44pt,在网页至少 44px。

不要做

  • 高级感的展示标题不要用 Inter。
  • 大面积不要用纯黑 #000000。
  • 不要加霓虹外发光,也不要自定义鼠标光标。
  • 不要把三张等宽功能卡当成默认布局。
  • 不要藏掉焦点环,也不要低于 AA 对比度。
DESIGN.md
---
version: alpha
name: 夜柠 Night Lime
description: 炭黑底上的一抹酸绿,像夜间播放列表。
colors:
  primary: "#1DB954"
  secondary: "#A1A1AA"
  tertiary: "#FFFFFF"
  background: "#121212"
  surface: "#181818"
  onPrimary: "#F4F4F5"
  onSecondary: "#F4F4F5"
  onTertiary: "#18181B"
  onBackground: "#FAFAF9"
  onSurface: "#FAFAF9"
  outline: "#282828"
  muted: "#B3B3B3"
  success: "#1DB954"
  warning: "#F59E0B"
  error: "#E11D48"
typography:
  h1:
    fontFamily: Outfit
    fontSize: 40px
    fontWeight: 600
    lineHeight: 1.12
    letterSpacing: -0.03em
  h2:
    fontFamily: Outfit
    fontSize: 28px
    fontWeight: 600
    lineHeight: 1.2
    letterSpacing: -0.02em
  h3:
    fontFamily: Outfit
    fontSize: 20px
    fontWeight: 600
    lineHeight: 1.3
    letterSpacing: -0.01em
  body:
    fontFamily: DM Sans
    fontSize: 16px
    fontWeight: 400
    lineHeight: 1.55
    letterSpacing: 0em
  label:
    fontFamily: DM Sans
    fontSize: 13px
    fontWeight: 500
    lineHeight: 1.3
    letterSpacing: 0.02em
  caption:
    fontFamily: DM Sans
    fontSize: 12px
    fontWeight: 400
    lineHeight: 1.4
    letterSpacing: 0em
  mono:
    fontFamily: JetBrains Mono
    fontSize: 13px
    fontWeight: 500
    lineHeight: 1.45
    letterSpacing: 0em
rounded:
  sm: 4px
  md: 8px
  lg: 12px
  xl: 20px
  full: 999px
spacing:
  xs: 4px
  sm: 8px
  md: 16px
  lg: 24px
  xl: 32px
  2xl: 48px
  3xl: 64px
components:
  navbar:
    backgroundColor: "{colors.background}"
    textColor: "{colors.onBackground}"
  hero:
    backgroundColor: "{colors.background}"
    textColor: "{colors.onBackground}"
  media:
    backgroundColor: "{colors.primary}"
    rounded: "{rounded.lg}"
  list-item:
    backgroundColor: "{colors.surface}"
    textColor: "{colors.onSurface}"
    height: 44px
  player:
    backgroundColor: "{colors.surface}"
    textColor: "{colors.onSurface}"
    rounded: "{rounded.lg}"
  footer:
    backgroundColor: "{colors.background}"
    textColor: "{colors.muted}"
---

# 夜柠 Night Lime

## Overview

炭黑底上的一抹酸绿,像夜间播放列表。 整体气质是 日常应用适中、错落不对称、动效 流畅 CSS 动效。品牌语气:nocturnal / bold / media。密度 6/10,变化 5/10,动效 6/10。 材质:炭黑底、酸绿光晕缓慢呼吸、一张封面。不要把整页铺成仪表盘。

How to use: 把本文件放到仓库根目录。在 Cursor / Claude Code / Codex 提示词中写:请阅读 DESIGN.md 并严格遵守其中的 tokens 与 Do/Don't。

## Colors

Semantic roles for the dark theme. Keep a single accent; do not introduce a second brand hue.

- **primary** (`#1DB954`)
- **secondary** (`#A1A1AA`)
- **tertiary** (`#FFFFFF`)
- **background** (`#121212`)
- **surface** (`#181818`)
- **outline** (`#282828`)
- **muted** (`#B3B3B3`)
- **success** (`#1DB954`)
- **warning** (`#F59E0B`)
- **error** (`#E11D48`)
- **onPrimary** (`#F4F4F5`)
- **onSecondary** (`#F4F4F5`)
- **onTertiary** (`#18181B`)
- **onBackground** (`#FAFAF9`)
- **onSurface** (`#FAFAF9`)

## Typography

Hierarchy comes from weight and size, not from shouting. Body line length stays near 65 characters.

- **h1**: Outfit 600 / 40px / 1.12 / -0.03em
- **h2**: Outfit 600 / 28px / 1.2 / -0.02em
- **h3**: Outfit 600 / 20px / 1.3 / -0.01em
- **body**: "DM Sans" 400 / 16px / 1.55 / 0em
- **label**: "DM Sans" 500 / 13px / 1.3 / 0.02em
- **caption**: "DM Sans" 400 / 12px / 1.4 / 0em
- **mono**: "JetBrains Mono" 500 / 13px / 1.45 / 0em

## Layout

Spacing scale: xs=4px, sm=8px, md=16px, lg=24px, xl=32px, 2xl=48px, 3xl=64px.

iOS:触控目标 ≥ 44pt,尊重 Safe Area 与 Dynamic Type,图标用 SF Symbols,导航使用 Large Title / 分组列表。

Web:移动优先,<768px 单列,正文 ≥ 16px,标题用 clamp(),容器 max-width 约 1120–1400px,全高区块用 min-h-[100dvh]。

Every element occupies its own spatial zone. No overlapping hero text. Collapse multi-column layouts below 768px.

## Elevation & Depth

- sm: `0 1px 2px rgba(24,24,27,0.06)`
- md: `0 8px 24px rgba(24,24,27,0.08)`
- lg: `0 18px 48px rgba(24,24,27,0.12)`
- surface: `flat`
- recipe: 炭黑底、酸绿光晕缓慢呼吸、一张封面。不要把整页铺成仪表盘。

阴影带背景色相。高密度布局可用细分隔线代替卡片。
动效已接线:按钮按下、开关、滑杆和画布明暗使用 200ms / cubic-bezier(0.22, 1, 0.36, 1),弹簧 stiffness 100 / damping 20。液态/黏土按压用弹性;野兽按下吃掉硬偏移;新拟态按下变内凹。
氛围性格是呼吸:酸绿光晕在炭黑底上缓慢涨落。表面仍是扁的。 循环氛围在 prefers-reduced-motion 时停止;按下仍可以一次到位。


## Shapes

Radius scale: sm=4px, md=8px, lg=12px, xl=20px, full=999px.

## Components

- **导航栏** (`web.navbar` / default / md): 桌面横导航含 logo、带图标的链接和一个主 CTA。
- **Hero** (`web.hero` / left / lg): Hero 使用 left 布局,最多一个主 CTA,禁止「Scroll to explore」。
- **媒体位** (`media` / wide / md): 几何封面位或本地图片,圆角跟 tokens。禁止远程图。
- **列表行** (`list-item` / chevron / md): 行高至少 44pt,标题 + 说明,右侧可放 chevron。
- **列表行** (`list-item` / chevron / md): 行高至少 44pt,标题 + 说明,右侧可放 chevron。
- **列表行** (`list-item` / chevron / md): 行高至少 44pt,标题 + 说明,右侧可放 chevron。
- **播放条** (`player` / mini / md): 迷你播放条:封面、曲名、进度。落地用系统 Now Playing。
- **页脚** (`web.footer` / default / md): 页脚克制,链接分组清晰。

## Do's and Don'ts

### Do
- 组件里用语义色 token,不要写死 hex。
- 只留一个强调色;层级靠字重和留白。
- 写清默认、悬停、焦点、按下、禁用和加载状态。
- 正文和可交互标签达到 WCAG 2.2 AA 对比度。
- 触控区域在 iOS 至少 44×44pt,在网页至少 44px。

### Don't
- 高级感的展示标题不要用 Inter。
- 大面积不要用纯黑 #000000。
- 不要加霓虹外发光,也不要自定义鼠标光标。
- 不要把三张等宽功能卡当成默认布局。
- 不要藏掉焦点环,也不要低于 AA 对比度。