Files
DevFlow/src/styles/global.css
绝尘 80b9243528 重构: 前端 composable 拆分+详情页 Markdown 渲染+流式 memo+状态同步+bug 修复
- composables/useMarkdown 抽(AiChat 复用)+ai/* 流式核心+useAiSend catch 回滚 user msg(B-21)+useAiStream 超时文案(B-03)+useAiConversations 切换 token(FR-R1)
- views/TaskDetail 新建(F-02)+描述 md+mdReady 响应式+字段同行布局(B-24/31)
- views/ProjectDetail 多选审批 UI(F-01)+描述 md+mdReady+字段同行(B-25/31)
- views/Ideas+Knowledge 描述 md+mdReady(B-25)
- views/Tasks 项目切换联动(B-29)+task 详情跳转
- components/AiChat toast 失败提示(B-20)+流式块级 memo(ARC-08)+clean UI(AR-7)+stop 兜底(AR-5)
- components/ToolCard 审批卡片可读化(AR-3)
- stores useAiStore barrel(ARC-04)+del settings mock(ARC-01)+approve options(R-PD-5)
- i18n aiTool/nav 中英对称(AR-3/9)+删 nav.decisions 死链(ARC-02)
- router /tasks/:id(F-02)+global.css selection 可见(R-260615-01)+api task detail+App 删 decisions nav
2026-06-15 05:14:56 +08:00

223 lines
8.3 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.
/* ═══════════════════════════════════════════════════════════
DevFlow Design System — Claude 设计系统规范
扁平化 · 0.5px 边框 · 8/12px 圆角 · 400/500 字重
紫/青绿/琥珀/珊瑚 四色体系 · 深色优先
═══════════════════════════════════════════════════════════ */
:root {
/* — Surface — */
--df-bg: #0c0e1a;
--df-bg-raised: #12152a;
--df-bg-card: #171b33;
--df-bg-card-hover: #1c2140;
--df-sidebar-bg: #090b15;
--df-sidebar-hover: rgba(108,99,255,0.06);
--df-sidebar-active: rgba(108,99,255,0.12);
/* — Text — */
--df-text: #eef0f6;
--df-text-secondary: #8b90a8;
--df-text-dim: #4a4f6a;
/* — Accent: 紫色系(系统功能、互动元素)— */
--df-accent: #7b6ff0;
--df-accent-hover: #6a5de0;
--df-accent-soft: rgba(123,111,240,0.15);
--df-accent-bg: rgba(123,111,240,0.08);
/* — Semantic — */
/* 青绿:成功/流程 */
--df-success: #3ddba0;
--df-success-bg: rgba(61,219,160,0.12);
/* 琥珀:警告/热度 */
--df-warning: #f0c75e;
--df-warning-bg: rgba(240,199,94,0.12);
/* 珊瑚:危险/对比 */
--df-danger: #f06565;
--df-danger-bg: rgba(240,101,101,0.12);
/* 蓝色:信息 */
--df-info: #5eaff0;
--df-info-bg: rgba(94,175,240,0.12);
/* — Border: 统一 0.5px 极细边框 — */
--df-border: rgba(255,255,255,0.06);
--df-border-strong: rgba(255,255,255,0.10);
/* — Radius: 2/4/6/8/10 渐进(全站统一走 token— */
--df-radius-xs: 2px;
--df-radius-sm: 4px;
--df-radius: 6px;
--df-radius-md: 8px;
--df-radius-lg: 10px;
/* — Spacing: 全站间距基准(参考总览紧凑度,回退改值即可)— */
--df-gap-page: 14px; /* 页面区块间距header→主区、区块垂直分隔 */
--df-gap-grid: 12px; /* 卡片/网格 gap */
--df-gap-head: 10px; /* 面板标题→内容 */
--df-pad-panel: 14px 16px; /* 面板/卡片内边距 */
--df-msg-max-width: 90%; /* AI 气泡/工具卡片最大宽度(对齐不撑满) */
/* — Typography: 仅 400/500 字重 — */
--df-font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
--df-font-mono: 'JetBrains Mono', 'SF Mono', 'Cascadia Code', monospace;
/* — Transition — */
--df-ease: cubic-bezier(0.4, 0, 0.2, 1);
}
/* ═══ 亮色主题 ═══ */
[data-theme="light"] {
--df-bg: #f5f6fa;
--df-bg-raised: #ffffff;
--df-bg-card: #ffffff;
--df-bg-card-hover: #f0f1f5;
--df-sidebar-bg: #ffffff;
--df-sidebar-hover: rgba(108,99,255,0.06);
--df-sidebar-active: rgba(108,99,255,0.10);
--df-text: #1a1d2e;
--df-text-secondary: #5a5f7a;
--df-text-dim: #9a9fba;
--df-accent: #6c5ce7;
--df-accent-hover: #5b4bd6;
--df-accent-soft: rgba(108,92,231,0.15);
--df-accent-bg: rgba(108,92,231,0.06);
--df-success: #00b894;
--df-success-bg: rgba(0,184,148,0.10);
--df-warning: #e17055;
--df-warning-bg: rgba(225,112,85,0.10);
--df-danger: #d63031;
--df-danger-bg: rgba(214,48,49,0.10);
--df-info: #0984e3;
--df-info-bg: rgba(9,132,227,0.10);
--df-border: rgba(0,0,0,0.08);
--df-border-strong: rgba(0,0,0,0.14);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body, #app {
height: 100%;
width: 100%;
overflow: hidden;
font-family: var(--df-font-sans);
font-size: 14px;
font-weight: 400;
background: var(--df-bg);
color: var(--df-text);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
line-height: 1.5;
}
/* — Scrollbar — */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: var(--df-radius-xs); }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.14); }
/* — Selection — */
/* 选中态用 accent 实色 + 白字:保证紫底气泡(accent)选中也高对比可读,
避免 accent-soft(透明紫)叠 accent 紫底导致紫字紫底不可见(深色主题) */
::selection { background: var(--df-accent-hover); color: #fff; }
/* — Animations — */
@keyframes fadeInUp {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes pulseGlow {
0%, 100% { box-shadow: 0 0 0 0 var(--df-accent-soft); }
50% { box-shadow: 0 0 12px 2px var(--df-accent-soft); }
}
/* ═══════════════════════════════════════════════════════════
公共组件 — 各功能页复用,避免 scoped 重复定义
class 名与各页 template 保持一致,零侵入
═══════════════════════════════════════════════════════════ */
/* — Page Header功能内页统一24px 标题 + 紧凑下间距)— */
.page-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: var(--df-gap-page);
}
.page-header h1 { font-size: 24px; font-weight: 500; color: var(--df-text); }
.header-actions { display: flex; gap: 10px; }
/* — Button — */
.btn {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 10px 16px;
line-height: 1;
border: none;
border-radius: var(--df-radius-sm);
font-family: var(--df-font-sans);
font-size: 13px;
font-weight: 500;
cursor: pointer;
transition: all 0.15s var(--df-ease);
white-space: nowrap;
}
.btn-primary { background: var(--df-accent); color: #fff; }
.btn-primary:hover { background: var(--df-accent-hover); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--df-text-secondary); border: 0.5px solid var(--df-border); }
.btn-ghost:hover { background: var(--df-bg-card); color: var(--df-text); }
.btn-accent { background: var(--df-success-bg); color: var(--df-success); border: 0.5px solid rgba(61,219,160,0.3); }
.btn-accent:hover { background: rgba(61,219,160,0.22); }
.btn-sm { padding: 4px 12px; font-size: 12px; }
.btn-link { background: none; border: none; color: var(--df-accent); font-size: 12px; cursor: pointer; padding: 2px 6px; }
.btn-link:hover { text-decoration: underline; }
.btn-link-danger { color: var(--df-danger); }
/* — Modal — */
.modal-overlay {
position: fixed;
inset: 0;
background: rgba(0,0,0,0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 100;
}
.modal-box {
background: var(--df-bg-card);
border: 0.5px solid var(--df-border);
border-radius: var(--df-radius-lg);
padding: 24px;
min-width: 360px;
max-width: 90vw;
}
.modal-title { font-size: 18px; font-weight: 500; color: var(--df-text); margin-bottom: 16px; }
.modal-field { margin-bottom: 14px; }
.modal-field label { display: block; font-size: 12px; color: var(--df-text-dim); margin-bottom: 4px; }
.modal-field input,
.modal-field textarea,
.modal-field select {
width: 100%;
padding: 8px 10px;
border-radius: var(--df-radius-sm);
border: 0.5px solid var(--df-border);
background: var(--df-bg);
color: var(--df-text);
font-size: 13px;
font-family: inherit;
box-sizing: border-box;
}
.modal-field input:focus,
.modal-field textarea:focus,
.modal-field select:focus { outline: none; border-color: var(--df-accent); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
/* — Empty State — */
.empty-state { text-align: center; padding: 60px 20px; font-size: 14px; color: var(--df-text-dim); }
.empty-hint { font-size: 13px; color: var(--df-text-dim); padding: 12px 0; }