Files
bid-doctor/docs/design/system/tokens.css
YANG JIANKUAN cbd5c8d28d docs(design): 新增产品界面设计规范 v0.1、设计变量与组件预览
- design-system.md:原则、颜色与对比度实测、字体字阶、布局、17 个组件、交互模式、文案规范、无障碍与红线自查
- system/tokens.css:设计变量;system/components.html:用样本条款演示的组件预览
- 问题级别用实心 / 描边 / 无框区分(色弱模拟验证),红色只给致命问题

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 21:24:09 +08:00

106 lines
4.8 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* 标博士 · 界面设计变量(design tokens)v0.1
* 规范说明见 docs/design/design-system.md;预览见同目录 components.html。
* 只放变量,不放组件样式。技术架构选定组件库后,把这些值映射到组件库的主题配置。
* 对比度一律按 WCAG 2.x 公式计算,底色为校样纸 #F5F6F3(括号内为白底)。
*/
:root {
/* ---------- 基础色板:校样色系 ---------- */
--c-paper: #F5F6F3; /* 校样纸:页面底色 */
--c-white: #FFFFFF; /* 卡片、表格、输入框 */
--c-sunken: #ECEEEA; /* 表头、代码、凹陷区 */
--c-hover: #EEF0EC; /* 行悬停 */
--c-ink: #1D2733; /* 墨:正文、人工确认、主按钮 13.9 (15.1) */
--c-sub: #5C6670; /* 辅助灰:次要文字、「提示」级 5.4 (5.9) */
--c-muted: #7A838C; /* 只用于禁用文字与控件边框 3.6 (3.9),不能用于正文 */
--c-rule: #D9DDD8; /* 装饰分隔线(不承担识别功能) */
--c-pencil: #2F5BD3; /* 蓝铅笔:AI 标注、出处、原文链接 5.4 (5.9) */
--c-pencil-strong: #244AB0;/* 蓝铅笔悬停 / 按下 */
--c-pencil-soft: #E7EDFB; /* 原句高亮底色 */
--c-fatal: #C4122F; /* 致命红:只用于「致命」问题 5.6 (6.0) */
--c-fatal-soft: #FBE9EC;
--c-ochre: #A66300; /* 赭:「重要」级的边框、图标、≥18px 文字 4.4 (4.8) */
--c-ochre-ink: #8A5200; /* 赭色小字(<18px) 5.9 (6.4) */
--c-ochre-soft: #FBF0DC;
--c-green: #2E6B4F; /* 定稿绿:人工确认署名 5.8 (6.3) */
--c-green-soft: #E5F0EA;
/* 印章红 #D9291C、藏青 #1C2554 只属于 logo,不进界面变量 */
/* ---------- 语义色 ---------- */
--bg-page: var(--c-paper);
--bg-surface: var(--c-white);
--bg-sunken: var(--c-sunken);
--bg-hover: var(--c-hover);
--text-primary: var(--c-ink);
--text-secondary: var(--c-sub);
--text-disabled: var(--c-muted);
--text-on-dark: var(--c-white);
--border-subtle: var(--c-rule);
--border-control: var(--c-muted); /* 输入框等控件边框,≥3:1(WCAG 1.4.11) */
--border-strong: var(--c-ink);
--focus-ring: var(--c-ink);
--ai: var(--c-pencil);
--ai-strong: var(--c-pencil-strong);
--ai-soft: var(--c-pencil-soft);
--human: var(--c-ink);
--confirmed: var(--c-green);
--confirmed-soft: var(--c-green-soft);
--sev-fatal: var(--c-fatal);
--sev-fatal-soft: var(--c-fatal-soft);
--sev-major: var(--c-ochre);
--sev-major-text: var(--c-ochre-ink);
--sev-major-soft: var(--c-ochre-soft);
--sev-hint: var(--c-sub);
--sev-hint-soft: var(--c-sunken);
--warn: var(--c-ochre); /* 系统提醒、表单错误、额度预警:不用红 */
--warn-text: var(--c-ochre-ink);
--warn-soft: var(--c-ochre-soft);
/* ---------- 字体 ---------- */
--font-sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, sans-serif;
--font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
--font-figures: "Barlow Semi Condensed", var(--font-sans);
/* 字阶:字号 / 行高(px)。正文 14/22 与 TDesign、Ant Design 一致 */
--fs-caption: 12px; --lh-caption: 20px; /* 时间戳、脚注;最小字号 */
--fs-body: 14px; --lh-body: 22px; /* 界面正文 */
--lh-read: 24px; /* 原文引用等成段阅读:14/24 */
--fs-title: 16px; --lh-title: 24px; /* 问题标题、卡片标题、区块标题 */
--fs-h2: 20px; --lh-h2: 28px; /* 页面标题(宋体) */
--fs-h1: 24px; --lh-h1: 32px; /* 工作台、报告标题(宋体) */
--fs-figure: 30px; --lh-figure: 36px; /* 统计数字(Barlow) */
--fw-regular: 400;
--fw-medium: 500;
--fw-bold: 600;
/* ---------- 间距:4px 基准 ---------- */
--sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
--sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px; --sp-16: 64px;
/* ---------- 圆角、线、阴影 ---------- */
--radius-sm: 2px; /* 按钮、标签、输入框、卡片 */
--radius-md: 4px; /* 对话框、浮层 */
--line: 1px;
--line-sev: 1.5px; /* 「重要」标签描边 */
--shadow-overlay: 0 4px 16px rgba(29, 39, 51, .14), 0 1px 3px rgba(29, 39, 51, .10);
/* ---------- 尺寸 ---------- */
--control-h: 32px; /* 默认按钮、输入框 */
--control-h-sm: 28px; /* 表格行内 */
--control-h-lg: 40px; /* 登录、空状态主操作 */
--sidebar-w: 216px;
--margin-note-w: 280px; /* 页边批注栏 */
--content-max: 1200px;
/* ---------- 动效 ---------- */
--dur-fast: 120ms;
--dur-base: 200ms;
--ease: cubic-bezier(.2, 0, 0, 1);
}
@media (prefers-reduced-motion: reduce) {
:root { --dur-fast: 0ms; --dur-base: 0ms; }
}