-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariables.css
More file actions
227 lines (197 loc) · 8.49 KB
/
variables.css
File metadata and controls
227 lines (197 loc) · 8.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
/* variables.css - FlexiCSS Design Tokens (2026)
*
* Modern CSS custom properties using oklch() color space,
* @property typed declarations, and systematic scales.
*/
/* ── Typed Custom Properties ─────────────────────────────── */
@property --flexi-hue {
syntax: '<number>';
inherits: true;
initial-value: 250;
}
@property --flexi-saturation {
syntax: '<percentage>';
inherits: true;
initial-value: 70%;
}
/* ── Color System (oklch) ────────────────────────────────── */
:root {
/* Core palette — oklch(lightness chroma hue) */
--primary-color: oklch(0.55 0.22 var(--flexi-hue));
--primary-hover: oklch(0.48 0.24 var(--flexi-hue));
--primary-active: oklch(0.42 0.26 var(--flexi-hue));
--primary-subtle: oklch(0.95 0.03 var(--flexi-hue));
--secondary-color: oklch(0.55 0.05 250);
--secondary-hover: oklch(0.48 0.06 250);
--secondary-subtle: oklch(0.95 0.01 250);
--success-color: oklch(0.55 0.18 145);
--warning-color: oklch(0.75 0.18 85);
--danger-color: oklch(0.55 0.22 25);
--info-color: oklch(0.60 0.15 230);
/* Surfaces */
--background-color: oklch(1.0 0 0);
--surface-color: oklch(0.97 0 0);
--surface-raised: oklch(1.0 0 0);
--surface-overlay: oklch(0.99 0 0);
--border-color: oklch(0.87 0 0);
--border-subtle: oklch(0.92 0 0);
/* Text */
--text-color: oklch(0.15 0 0);
--text-muted: oklch(0.45 0 0);
--text-subtle: oklch(0.60 0 0);
--text-on-primary: oklch(1.0 0 0);
/* Focus & Accessibility */
--focus-color: oklch(0.60 0.22 var(--flexi-hue));
--focus-ring-width: 2px;
--focus-ring-offset: 3px;
/* Navbar */
--navbar-bg-color: oklch(0.25 0.02 250);
--navbar-text-color: oklch(0.95 0 0);
/* Shadows — layered for depth */
--shadow-sm: 0 1px 2px oklch(0 0 0 / 0.05);
--shadow-md: 0 4px 6px -1px oklch(0 0 0 / 0.07), 0 2px 4px -2px oklch(0 0 0 / 0.05);
--shadow-lg: 0 10px 15px -3px oklch(0 0 0 / 0.08), 0 4px 6px -4px oklch(0 0 0 / 0.04);
--shadow-xl: 0 20px 25px -5px oklch(0 0 0 / 0.10), 0 8px 10px -6px oklch(0 0 0 / 0.04);
}
/* ── Typography ──────────────────────────────────────────── */
:root {
--font-family-base: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
--font-family-mono: ui-monospace, 'SF Mono', 'Cascadia Code', 'Segoe UI Mono', Menlo, monospace;
--font-weight-normal: 400;
--font-weight-medium: 500;
--font-weight-semibold: 600;
--font-weight-bold: 700;
--line-height-tight: 1.25;
--line-height-normal: 1.5;
--line-height-relaxed: 1.75;
--letter-spacing-tight: -0.025em;
--letter-spacing-normal: 0;
--letter-spacing-wide: 0.025em;
}
/* ── Fluid Typography Scale (clamp) ─────────────────────── */
:root {
--text-xs: clamp(0.694rem, 0.66vi + 0.53rem, 0.8rem);
--text-sm: clamp(0.833rem, 0.75vi + 0.65rem, 0.925rem);
--text-base: clamp(1rem, 0.85vi + 0.79rem, 1.0625rem);
--text-lg: clamp(1.125rem, 1.0vi + 0.88rem, 1.25rem);
--text-xl: clamp(1.25rem, 1.2vi + 0.95rem, 1.5rem);
--text-2xl: clamp(1.5rem, 1.5vi + 1.1rem, 1.875rem);
--text-3xl: clamp(1.875rem, 2.0vi + 1.3rem, 2.25rem);
--text-4xl: clamp(2.25rem, 2.5vi + 1.5rem, 3rem);
}
/* ── Spacing Scale ───────────────────────────────────────── */
:root {
--space-0: 0;
--space-1: 0.25rem;
--space-2: 0.5rem;
--space-3: 0.75rem;
--space-4: 1rem;
--space-5: 1.25rem;
--space-6: 1.5rem;
--space-8: 2rem;
--space-10: 2.5rem;
--space-12: 3rem;
--space-16: 4rem;
--space-20: 5rem;
--spacer: var(--space-4);
}
/* ── Border Radius ───────────────────────────────────────── */
:root {
--radius-sm: 0.25rem;
--radius-md: 0.5rem;
--radius-lg: 0.75rem;
--radius-xl: 1rem;
--radius-2xl: 1.5rem;
--radius-full: 9999px;
}
/* ── Transitions ─────────────────────────────────────────── */
:root {
--ease-default: cubic-bezier(0.4, 0, 0.2, 1);
--ease-in: cubic-bezier(0.4, 0, 1, 1);
--ease-out: cubic-bezier(0, 0, 0.2, 1);
--ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
--ease-spring: linear(0, 0.006, 0.025 2.8%, 0.101 6.1%, 0.539 18.9%, 0.721 25.3%, 0.849 31.5%, 0.937 38.1%, 0.98 43.6%, 0.998 53.5%, 1);
--duration-fast: 100ms;
--duration-normal: 200ms;
--duration-slow: 350ms;
}
/* ── Container Widths ────────────────────────────────────── */
:root {
--container-sm: 576px;
--container-md: 768px;
--container-lg: 992px;
--container-xl: 1200px;
--container-2xl: 1400px;
}
/* ── Z-Index Scale ───────────────────────────────────────── */
:root {
--z-dropdown: 100;
--z-sticky: 200;
--z-fixed: 300;
--z-overlay: 400;
--z-modal: 500;
--z-toast: 600;
}
/* ── Dark Mode ───────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
:root {
--primary-color: oklch(0.70 0.18 var(--flexi-hue));
--primary-hover: oklch(0.75 0.20 var(--flexi-hue));
--primary-active: oklch(0.65 0.22 var(--flexi-hue));
--primary-subtle: oklch(0.25 0.06 var(--flexi-hue));
--secondary-color: oklch(0.65 0.04 250);
--secondary-hover: oklch(0.70 0.05 250);
--secondary-subtle: oklch(0.25 0.02 250);
--success-color: oklch(0.70 0.16 145);
--warning-color: oklch(0.80 0.16 85);
--danger-color: oklch(0.70 0.18 25);
--info-color: oklch(0.70 0.13 230);
--background-color: oklch(0.14 0.005 250);
--surface-color: oklch(0.18 0.005 250);
--surface-raised: oklch(0.22 0.008 250);
--surface-overlay: oklch(0.20 0.006 250);
--border-color: oklch(0.30 0.01 250);
--border-subtle: oklch(0.25 0.008 250);
--text-color: oklch(0.93 0 0);
--text-muted: oklch(0.65 0 0);
--text-subtle: oklch(0.50 0 0);
--text-on-primary: oklch(0.10 0 0);
--navbar-bg-color: oklch(0.12 0.005 250);
--navbar-text-color: oklch(0.93 0 0);
--shadow-sm: 0 1px 2px oklch(0 0 0 / 0.20);
--shadow-md: 0 4px 6px -1px oklch(0 0 0 / 0.25), 0 2px 4px -2px oklch(0 0 0 / 0.15);
--shadow-lg: 0 10px 15px -3px oklch(0 0 0 / 0.30), 0 4px 6px -4px oklch(0 0 0 / 0.15);
--shadow-xl: 0 20px 25px -5px oklch(0 0 0 / 0.35), 0 8px 10px -6px oklch(0 0 0 / 0.15);
}
}
/* ── High Contrast ───────────────────────────────────────── */
@media (prefers-contrast: high) {
:root {
--focus-ring-width: 3px;
--border-color: oklch(0.30 0 0);
--text-muted: oklch(0.30 0 0);
}
}
/* ── Manual Dark Mode Toggle ─────────────────────────────── */
[data-theme="dark"] {
--primary-color: oklch(0.70 0.18 var(--flexi-hue));
--primary-hover: oklch(0.75 0.20 var(--flexi-hue));
--primary-active: oklch(0.65 0.22 var(--flexi-hue));
--primary-subtle: oklch(0.25 0.06 var(--flexi-hue));
--background-color: oklch(0.14 0.005 250);
--surface-color: oklch(0.18 0.005 250);
--surface-raised: oklch(0.22 0.008 250);
--surface-overlay: oklch(0.20 0.006 250);
--border-color: oklch(0.30 0.01 250);
--border-subtle: oklch(0.25 0.008 250);
--text-color: oklch(0.93 0 0);
--text-muted: oklch(0.65 0 0);
--text-subtle: oklch(0.50 0 0);
--text-on-primary: oklch(0.10 0 0);
--navbar-bg-color: oklch(0.12 0.005 250);
--navbar-text-color: oklch(0.93 0 0);
--shadow-sm: 0 1px 2px oklch(0 0 0 / 0.20);
--shadow-md: 0 4px 6px -1px oklch(0 0 0 / 0.25), 0 2px 4px -2px oklch(0 0 0 / 0.15);
--shadow-lg: 0 10px 15px -3px oklch(0 0 0 / 0.30), 0 4px 6px -4px oklch(0 0 0 / 0.15);
--shadow-xl: 0 20px 25px -5px oklch(0 0 0 / 0.35), 0 8px 10px -6px oklch(0 0 0 / 0.15);
}