Skip to content

Commit 565b4a7

Browse files
committed
style(styles): 添加全局颜色和3D效果变量
- 新增了完整的颜色变量,包括主色、文本色和背景色 - 添加多种阴影效果变量,用于提升界面层次感 - 引入边框高亮和阴影效果变量,增强视觉细节 - 增加变换效果变量,用于交互状态的位移变化 - 添加多种渐变色变量,方便实现丰富的渐变背景 - 定义了全圆角变量,增加组件样式的灵活性
1 parent 3b8b81c commit 565b4a7

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

src/frontEnd/src/assets/styles/variables.scss

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ $spacing-xl: 32px;
2020
$border-radius: 6px;
2121
$border-radius-lg: 8px;
2222
$border-radius-xl: 12px;
23+
$border-radius-full: 9999px;
2324

2425
// 字重
2526
$font-weight-normal: 400;
@@ -29,3 +30,59 @@ $font-weight-bold: 700;
2930

3031
// 过渡
3132
$transition-base: all 0.2s ease;
33+
34+
// 颜色
35+
$primary-color: #6366f1;
36+
$text-color: #1e293b;
37+
$text-color-white: #ffffff;
38+
$bg-color-dark: #0f172a;
39+
40+
// 表面色
41+
$surface-lighter: #f8fafc;
42+
$surface-white: #ffffff;
43+
44+
// ==================== 3D效果变量 ====================
45+
46+
// 阴影效果
47+
$shadow-raised:
48+
0 2px 4px rgba(0, 0, 0, 0.05),
49+
0 4px 8px rgba(0, 0, 0, 0.08),
50+
inset 0 1px 0 rgba(255, 255, 255, 0.8);
51+
52+
$shadow-elevated:
53+
0 8px 16px rgba(0, 0, 0, 0.1),
54+
0 16px 32px rgba(0, 0, 0, 0.08),
55+
inset 0 1px 0 rgba(255, 255, 255, 0.9);
56+
57+
$shadow-floating:
58+
0 12px 24px rgba(0, 0, 0, 0.12),
59+
0 24px 48px rgba(0, 0, 0, 0.1),
60+
inset 0 1px 0 rgba(255, 255, 255, 1);
61+
62+
$shadow-pressed:
63+
inset 0 2px 4px rgba(0, 0, 0, 0.1),
64+
inset 0 4px 8px rgba(0, 0, 0, 0.05),
65+
0 1px 2px rgba(0, 0, 0, 0.05);
66+
67+
$shadow-inset-dark: inset 0 2px 4px rgba(0, 0, 0, 0.08);
68+
$shadow-inset-light: inset 0 1px 2px rgba(255, 255, 255, 0.6);
69+
$shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
70+
71+
// 边框效果
72+
$border-highlight: 1px solid rgba(255, 255, 255, 0.8);
73+
$border-shadow: 1px solid rgba(0, 0, 0, 0.08);
74+
75+
// 变换效果
76+
$transform-hover: translateY(-2px);
77+
$transform-press: translateY(1px);
78+
$transform-float: translateY(-4px);
79+
80+
// 渐变效果
81+
$gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
82+
$gradient-secondary: linear-gradient(135deg, #64748b 0%, #475569 100%);
83+
$gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
84+
$gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
85+
$gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
86+
$gradient-rainbow: linear-gradient(90deg,
87+
#ef4444 0%, #f59e0b 16%, #eab308 32%,
88+
#22c55e 48%, #06b6d4 64%, #3b82f6 80%, #8b5cf6 100%);

0 commit comments

Comments
 (0)