|
@@ -0,0 +1,192 @@
|
|
|
|
|
+/**
|
|
|
|
|
+ * CSS 变量定义 - 现代风格
|
|
|
|
|
+ */
|
|
|
|
|
+
|
|
|
|
|
+:root {
|
|
|
|
|
+ // ========== 主题色(默认 Indigo)==========
|
|
|
|
|
+ --color-primary: #6366f1;
|
|
|
|
|
+ --color-primary-light-3: #818cf8;
|
|
|
|
|
+ --color-primary-light-5: #a5b4fc;
|
|
|
|
|
+ --color-primary-light-7: #c7d2fe;
|
|
|
|
|
+ --color-primary-light-9: #e0e7ff;
|
|
|
|
|
+ --color-primary-dark-2: #4f46e5;
|
|
|
|
|
+
|
|
|
|
|
+ // 语义色
|
|
|
|
|
+ --color-success: #10b981;
|
|
|
|
|
+ --color-success-light: #34d399;
|
|
|
|
|
+ --color-warning: #f59e0b;
|
|
|
|
|
+ --color-warning-light: #fbbf24;
|
|
|
|
|
+ --color-danger: #ef4444;
|
|
|
|
|
+ --color-danger-light: #f87171;
|
|
|
|
|
+ --color-info: #6b7280;
|
|
|
|
|
+ --color-info-light: #9ca3af;
|
|
|
|
|
+
|
|
|
|
|
+ // ========== 背景色(浅色模式)==========
|
|
|
|
|
+ --bg-page: #f8fafc;
|
|
|
|
|
+ --bg-container: #ffffff;
|
|
|
|
|
+ --bg-header: #ffffff;
|
|
|
|
|
+ --bg-sidebar: #1e293b;
|
|
|
|
|
+ --bg-sidebar-logo: #0f172a;
|
|
|
|
|
+ --bg-hover: #f1f5f9;
|
|
|
|
|
+ --bg-active: var(--color-primary-light-9);
|
|
|
|
|
+ --bg-mask: rgba(0, 0, 0, 0.5);
|
|
|
|
|
+ --bg-tooltip: #1e293b;
|
|
|
|
|
+
|
|
|
|
|
+ // ========== 文字颜色 ==========
|
|
|
|
|
+ --text-primary: #0f172a;
|
|
|
|
|
+ --text-regular: #334155;
|
|
|
|
|
+ --text-secondary: #64748b;
|
|
|
|
|
+ --text-placeholder: #94a3b8;
|
|
|
|
|
+ --text-disabled: #cbd5e1;
|
|
|
|
|
+ --text-inverse: #ffffff;
|
|
|
|
|
+ --text-link: var(--color-primary);
|
|
|
|
|
+ --text-link-hover: var(--color-primary-dark-2);
|
|
|
|
|
+
|
|
|
|
|
+ // ========== 边框颜色 ==========
|
|
|
|
|
+ --border-color: #e2e8f0;
|
|
|
|
|
+ --border-color-light: #f1f5f9;
|
|
|
|
|
+ --border-color-lighter: #f8fafc;
|
|
|
|
|
+ --border-color-dark: #cbd5e1;
|
|
|
|
|
+
|
|
|
|
|
+ // ========== 阴影 ==========
|
|
|
|
|
+ --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
|
|
|
|
+ --shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
|
|
|
|
|
+ --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
|
|
|
|
|
+ --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
|
|
|
|
|
+ --shadow-header: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
|
|
|
|
|
+
|
|
|
|
|
+ // ========== 布局尺寸 ==========
|
|
|
|
|
+ --sidebar-width: 220px;
|
|
|
|
|
+ --sidebar-width-collapsed: 64px;
|
|
|
|
|
+ --header-height: 60px;
|
|
|
|
|
+ --content-padding: 20px;
|
|
|
|
|
+
|
|
|
|
|
+ // ========== 圆角 ==========
|
|
|
|
|
+ --radius-sm: 4px;
|
|
|
|
|
+ --radius-base: 8px;
|
|
|
|
|
+ --radius-lg: 12px;
|
|
|
|
|
+ --radius-xl: 16px;
|
|
|
|
|
+ --radius-full: 9999px;
|
|
|
|
|
+
|
|
|
|
|
+ // ========== 字体 ==========
|
|
|
|
|
+ --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
|
|
|
+ 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
|
|
|
+ --font-size-xs: 12px;
|
|
|
|
|
+ --font-size-sm: 13px;
|
|
|
|
|
+ --font-size-base: 14px;
|
|
|
|
|
+ --font-size-lg: 16px;
|
|
|
|
|
+ --font-size-xl: 18px;
|
|
|
|
|
+ --font-size-2xl: 20px;
|
|
|
|
|
+ --font-weight-normal: 400;
|
|
|
|
|
+ --font-weight-medium: 500;
|
|
|
|
|
+ --font-weight-semibold: 600;
|
|
|
|
|
+ --font-weight-bold: 700;
|
|
|
|
|
+ --line-height-tight: 1.25;
|
|
|
|
|
+ --line-height-base: 1.5;
|
|
|
|
|
+ --line-height-relaxed: 1.75;
|
|
|
|
|
+
|
|
|
|
|
+ // ========== 间距 ==========
|
|
|
|
|
+ --spacing-xs: 4px;
|
|
|
|
|
+ --spacing-sm: 8px;
|
|
|
|
|
+ --spacing-md: 12px;
|
|
|
|
|
+ --spacing-base: 16px;
|
|
|
|
|
+ --spacing-lg: 20px;
|
|
|
|
|
+ --spacing-xl: 24px;
|
|
|
|
|
+ --spacing-2xl: 32px;
|
|
|
|
|
+
|
|
|
|
|
+ // ========== 过渡动画 ==========
|
|
|
|
|
+ --transition-fast: 150ms;
|
|
|
|
|
+ --transition-base: 200ms;
|
|
|
|
|
+ --transition-slow: 300ms;
|
|
|
|
|
+ --transition-timing: cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
|
|
+
|
|
|
|
|
+ // ========== 侧边栏专用 ==========
|
|
|
|
|
+ --sidebar-text: #94a3b8;
|
|
|
|
|
+ --sidebar-text-active: #ffffff;
|
|
|
|
|
+ --sidebar-hover-bg: rgba(255, 255, 255, 0.05);
|
|
|
|
|
+ --sidebar-active-bg: var(--color-primary);
|
|
|
|
|
+
|
|
|
|
|
+ // ========== 滚动条 ==========
|
|
|
|
|
+ --scrollbar-thumb: #cbd5e1;
|
|
|
|
|
+ --scrollbar-track: #f1f5f9;
|
|
|
|
|
+ --scrollbar-thumb-hover: #94a3b8;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// ==========================================
|
|
|
|
|
+// 深色模式
|
|
|
|
|
+// ==========================================
|
|
|
|
|
+html.dark {
|
|
|
|
|
+ // ========== 主题色(深色模式稍亮)==========
|
|
|
|
|
+ --color-primary: #818cf8;
|
|
|
|
|
+ --color-primary-light-3: #6366f1;
|
|
|
|
|
+ --color-primary-light-5: #4f46e5;
|
|
|
|
|
+ --color-primary-light-7: #4338ca;
|
|
|
|
|
+ --color-primary-light-9: #3730a3;
|
|
|
|
|
+ --color-primary-dark-2: #a5b4fc;
|
|
|
|
|
+
|
|
|
|
|
+ // 语义色
|
|
|
|
|
+ --color-success: #34d399;
|
|
|
|
|
+ --color-success-light: #10b981;
|
|
|
|
|
+ --color-warning: #fbbf24;
|
|
|
|
|
+ --color-warning-light: #f59e0b;
|
|
|
|
|
+ --color-danger: #f87171;
|
|
|
|
|
+ --color-danger-light: #ef4444;
|
|
|
|
|
+ --color-info: #9ca3af;
|
|
|
|
|
+ --color-info-light: #6b7280;
|
|
|
|
|
+
|
|
|
|
|
+ // ========== 背景色(深色模式)==========
|
|
|
|
|
+ --bg-page: #09090b;
|
|
|
|
|
+ --bg-container: #18181b;
|
|
|
|
|
+ --bg-header: #18181b;
|
|
|
|
|
+ --bg-sidebar: #18181b;
|
|
|
|
|
+ --bg-sidebar-logo: #09090b;
|
|
|
|
|
+ --bg-hover: #27272a;
|
|
|
|
|
+ --bg-active: rgba(99, 102, 241, 0.15);
|
|
|
|
|
+ --bg-mask: rgba(0, 0, 0, 0.7);
|
|
|
|
|
+ --bg-tooltip: #f4f4f5;
|
|
|
|
|
+
|
|
|
|
|
+ // ========== 文字颜色 ==========
|
|
|
|
|
+ --text-primary: #fafafa;
|
|
|
|
|
+ --text-regular: #e4e4e7;
|
|
|
|
|
+ --text-secondary: #a1a1aa;
|
|
|
|
|
+ --text-placeholder: #71717a;
|
|
|
|
|
+ --text-disabled: #52525b;
|
|
|
|
|
+ --text-inverse: #ffffff;
|
|
|
|
|
+ --text-link: var(--color-primary);
|
|
|
|
|
+ --text-link-hover: var(--color-primary-dark-2);
|
|
|
|
|
+
|
|
|
|
|
+ // ========== 边框颜色 ==========
|
|
|
|
|
+ --border-color: #27272a;
|
|
|
|
|
+ --border-color-light: #3f3f46;
|
|
|
|
|
+ --border-color-lighter: #52525b;
|
|
|
|
|
+ --border-color-dark: #18181b;
|
|
|
|
|
+
|
|
|
|
|
+ // ========== 阴影 ==========
|
|
|
|
|
+ --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
|
|
|
|
|
+ --shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px -1px rgba(0, 0, 0, 0.4);
|
|
|
|
|
+ --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
|
|
|
|
|
+ --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
|
|
|
|
|
+ --shadow-header: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
|
|
|
|
|
+
|
|
|
|
|
+ // ========== 侧边栏专用 ==========
|
|
|
|
|
+ --sidebar-text: #a1a1aa;
|
|
|
|
|
+ --sidebar-text-active: #ffffff;
|
|
|
|
|
+ --sidebar-hover-bg: rgba(255, 255, 255, 0.08);
|
|
|
|
|
+ --sidebar-active-bg: var(--color-primary);
|
|
|
|
|
+
|
|
|
|
|
+ // ========== 滚动条 ==========
|
|
|
|
|
+ --scrollbar-thumb: #3f3f46;
|
|
|
|
|
+ --scrollbar-track: #27272a;
|
|
|
|
|
+ --scrollbar-thumb-hover: #52525b;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// ==========================================
|
|
|
|
|
+// 紧凑模式
|
|
|
|
|
+// ==========================================
|
|
|
|
|
+.compact-mode {
|
|
|
|
|
+ --font-size-base: 13px;
|
|
|
|
|
+ --spacing-base: 12px;
|
|
|
|
|
+ --spacing-lg: 16px;
|
|
|
|
|
+ --content-padding: 16px;
|
|
|
|
|
+ --header-height: 52px;
|
|
|
|
|
+}
|